Class: Action

Inherits:
Object
  • Object
show all
Defined in:
lib/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, step_name, options, &block) ⇒ Action

Returns a new instance of Action.



4
5
6
7
8
9
# File 'lib/action.rb', line 4

def initialize(name, step_name, options, &block)
  @name = name
  @step_name = step_name
  @options = options
  @block = block
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



2
3
4
# File 'lib/action.rb', line 2

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



2
3
4
# File 'lib/action.rb', line 2

def options
  @options
end

#step_nameObject (readonly)

Returns the value of attribute step_name.



2
3
4
# File 'lib/action.rb', line 2

def step_name
  @step_name
end

Instance Method Details

#runObject



11
12
13
# File 'lib/action.rb', line 11

def run
  instance_exec(&@block)
end