Class: Heya::Campaigns::Actions::Block::Execution

Inherits:
Object
  • Object
show all
Defined in:
lib/heya/campaigns/actions/block.rb

Instance Method Summary collapse

Constructor Details

#initialize(user:, step:, &block) ⇒ Execution

Returns a new instance of Execution.



8
9
10
# File 'lib/heya/campaigns/actions/block.rb', line 8

def initialize(user:, step:, &block)
  @user, @step, @block = user, step, block
end

Instance Method Details

#deliverObject



12
13
14
# File 'lib/heya/campaigns/actions/block.rb', line 12

def deliver
  instance_exec(@user, @step, &@block)
end