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 10 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 54 def action_location @action.location end
describe_source_to(visitor, *args)
click to toggle source
# File lib/cucumber/core/test/step.rb, line 19 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 15 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 30 def execute(*args) @action.execute(*args) end
inspect()
click to toggle source
# File lib/cucumber/core/test/step.rb, line 58 def inspect "#<#{self.class}: #{location}>" end
location()
click to toggle source
# File lib/cucumber/core/test/step.rb, line 46 def location source.last.location end
original_location()
click to toggle source
# File lib/cucumber/core/test/step.rb, line 50 def original_location source.last.original_location end
skip(*args)
click to toggle source
# File lib/cucumber/core/test/step.rb, line 26 def skip(*args) @action.skip(*args) end
text()
click to toggle source
# File lib/cucumber/core/test/step.rb, line 38 def text source.last.text end
to_s()
click to toggle source
# File lib/cucumber/core/test/step.rb, line 42 def to_s text end
with_action(location = nil, &block)
click to toggle source
# File lib/cucumber/core/test/step.rb, line 34 def with_action(location = nil, &block) self.class.new(source, Test::Action.new(location, &block)) end