mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Allow implicit subject to take arbitrary arguments
This allows easy construction of the subject when it has an initializer with parameters.
This commit is contained in:
parent
4e690e7906
commit
3abb48fe53
1 changed files with 2 additions and 2 deletions
|
@ -268,8 +268,8 @@ module Spectator::DSL
|
||||||
|
|
||||||
# Implicit subject definition.
|
# Implicit subject definition.
|
||||||
# Simply creates a new instance of the described type.
|
# Simply creates a new instance of the described type.
|
||||||
def subject
|
def subject(*args)
|
||||||
described_class.new
|
described_class.new(*args)
|
||||||
end
|
end
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue