Class: Surrogate::Invocation
- Inherits:
-
Object
- Object
- Surrogate::Invocation
- Defined in:
- lib/surrogate/invocation.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#block ⇒ Object
Returns the value of attribute block.
Instance Method Summary collapse
- #==(invocation) ⇒ Object
- #has_block? ⇒ Boolean
-
#initialize(args, &block) ⇒ Invocation
constructor
A new instance of Invocation.
Constructor Details
#initialize(args, &block) ⇒ Invocation
Returns a new instance of Invocation.
5 6 7 |
# File 'lib/surrogate/invocation.rb', line 5 def initialize(args, &block) self.args, self.block = args, block end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args
3 4 5 |
# File 'lib/surrogate/invocation.rb', line 3 def args @args end |
#block ⇒ Object
Returns the value of attribute block
3 4 5 |
# File 'lib/surrogate/invocation.rb', line 3 def block @block end |
Instance Method Details
#==(invocation) ⇒ Object
13 14 15 |
# File 'lib/surrogate/invocation.rb', line 13 def ==(invocation) args == invocation.args && has_block? == invocation.has_block? end |
#has_block? ⇒ Boolean
9 10 11 |
# File 'lib/surrogate/invocation.rb', line 9 def has_block? !!block end |