class Orchestra::Step::InlineStep::InlineContext
Public Class Methods
define_dependency(dep)
click to toggle source
# File lib/orchestra/step.rb, line 104 def self.define_dependency dep define_method dep do ivar = "@#{dep}" return instance_variable_get ivar if instance_variable_defined? ivar instance_variable_set ivar, @__state__[dep] end end
new(state, execute_block)
click to toggle source
# File lib/orchestra/step.rb, line 112 def initialize state, execute_block @__execute_block__ = execute_block @__state__ = state end
Public Instance Methods
execute(item = nil)
click to toggle source
# File lib/orchestra/step.rb, line 117 def execute item = nil if @__execute_block__.arity == 0 instance_exec &@__execute_block__ else instance_exec item, &@__execute_block__ end end