Class: Dry::Effects::Instructions::Execute

Inherits:
Dry::Effects::Instruction show all
Defined in:
lib/dry/effects/instructions/execute.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#blockObject (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

#callObject



14
15
16
# File 'lib/dry/effects/instructions/execute.rb', line 14

def call
  block.call
end