Class: Dry::Effects::Instructions::Execute
- Inherits:
-
Dry::Effects::Instruction
- Object
- Dry::Effects::Instruction
- Dry::Effects::Instructions::Execute
- Defined in:
- lib/dry/effects/instructions/execute.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(block) ⇒ Execute
constructor
A new instance of Execute.
Constructor Details
#initialize(block) ⇒ Execute
Returns a new instance of Execute.
9 10 11 12 |
# File 'lib/dry/effects/instructions/execute.rb', line 9 def initialize(block) super() @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
7 8 9 |
# File 'lib/dry/effects/instructions/execute.rb', line 7 def block @block end |
Instance Method Details
#call ⇒ Object
14 15 16 |
# File 'lib/dry/effects/instructions/execute.rb', line 14 def call block.call end |