Class: Cucumber::Tcl::StepDefinitions

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/tcl/step_definitions.rb

Defined Under Namespace

Classes: ArgumentList

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ StepDefinitions

Returns a new instance of StepDefinitions.

Raises:

  • (ArgumentError)


8
9
10
11
# File 'lib/cucumber/tcl/step_definitions.rb', line 8

def initialize(path)
  raise ArgumentError, "cucumber-tcl entry point #{path} does not exist." unless File.exists?(path)
  @tcl = ::Tcl::Interp.load_from_file(path)
end

Instance Method Details

#attempt_to_activate(test_step) ⇒ Object



13
14
15
16
# File 'lib/cucumber/tcl/step_definitions.rb', line 13

def attempt_to_activate(test_step)
  return test_step unless match?(test_step)
  test_step.with_action &action_for(test_step)
end