class Cucumber::Core::Test::Step

Attributes

source[R]

Public Class Methods

new(source, action = Test::UndefinedAction.new(source.last.location)) click to toggle source
# File lib/cucumber/core/test/step.rb, line 11
def initialize(source, action = Test::UndefinedAction.new(source.last.location))
  raise ArgumentError if source.any?(&:nil?)
  @source, @action = source, action
end

Public Instance Methods

action_location() click to toggle source
# File lib/cucumber/core/test/step.rb, line 55
def action_location
  @action.location
end
describe_source_to(visitor, *args) click to toggle source
# File lib/cucumber/core/test/step.rb, line 20
def describe_source_to(visitor, *args)
  source.reverse.each do |node|
    node.describe_to(visitor, *args)
  end
  self
end
describe_to(visitor, *args) click to toggle source
# File lib/cucumber/core/test/step.rb, line 16
def describe_to(visitor, *args)
  visitor.test_step(self, *args)
end
execute(*args) click to toggle source
# File lib/cucumber/core/test/step.rb, line 31
def execute(*args)
  @action.execute(*args)
end
inspect() click to toggle source
# File lib/cucumber/core/test/step.rb, line 59
def inspect
  "#<#{self.class}: #{location}>"
end
location() click to toggle source
# File lib/cucumber/core/test/step.rb, line 47
def location
  source.last.location
end
original_location() click to toggle source
# File lib/cucumber/core/test/step.rb, line 51
def original_location
  source.last.original_location
end
skip(*args) click to toggle source
# File lib/cucumber/core/test/step.rb, line 27
def skip(*args)
  @action.skip(*args)
end
text() click to toggle source
# File lib/cucumber/core/test/step.rb, line 39
def text
  source.last.text
end
to_s() click to toggle source
# File lib/cucumber/core/test/step.rb, line 43
def to_s
  text
end
with_action(location = nil, &block) click to toggle source
# File lib/cucumber/core/test/step.rb, line 35
def with_action(location = nil, &block)
  self.class.new(source, Test::Action.new(location, &block))
end