Class: Spec::Story::Runner::StoryMediator::Step

Inherits:
Object
  • Object
show all
Defined in:
lib/spec/story/runner/story_mediator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, name) ⇒ Step

Returns a new instance of Step.



120
121
122
123
# File 'lib/spec/story/runner/story_mediator.rb', line 120

def initialize(type, name)
  @type = type
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



118
119
120
# File 'lib/spec/story/runner/story_mediator.rb', line 118

def name
  @name
end

Instance Method Details

#to_procObject



125
126
127
128
129
130
131
# File 'lib/spec/story/runner/story_mediator.rb', line 125

def to_proc
  type = @type
  name = @name
  lambda do
    send(type, name)
  end
end