module Cucumber::LanguageSupport::LanguageMethods
Public Instance Methods
add_hook(phase, hook)
click to toggle source
# File lib/cucumber/language_support/language_methods.rb, line 22 def add_hook(phase, hook) hooks[phase.to_sym] << hook hook end
add_transform(transform)
click to toggle source
# File lib/cucumber/language_support/language_methods.rb, line 31 def add_transform(transform) transforms.unshift transform transform end
after_configuration(cli_configuration)
click to toggle source
# File lib/cucumber/language_support/language_methods.rb, line 8 def after_configuration(cli_configuration) configuration = Configuration.new(cli_configuration) hooks[:after_configuration].each do |hook| hook.invoke('AfterConfiguration', configuration) end end
available_step_definition(regexp_source, location)
click to toggle source
# File lib/cucumber/language_support/language_methods.rb, line 44 def available_step_definition(regexp_source, location) available_step_definition_hash[StepDefinitionLight.new(regexp_source, location)] = nil end
clear_hooks()
click to toggle source
# File lib/cucumber/language_support/language_methods.rb, line 27 def clear_hooks @hooks = nil end
execute_transforms(args)
click to toggle source
# File lib/cucumber/language_support/language_methods.rb, line 15 def execute_transforms(args) args.map do |arg| matching_transform = transforms.detect {|transform| transform.match(arg) } matching_transform ? matching_transform.invoke(arg) : arg end end
invoked_step_definition(regexp_source, location)
click to toggle source
# File lib/cucumber/language_support/language_methods.rb, line 48 def invoked_step_definition(regexp_source, location) invoked_step_definition_hash[StepDefinitionLight.new(regexp_source, location)] = nil end
unmatched_step_definitions()
click to toggle source
# File lib/cucumber/language_support/language_methods.rb, line 40 def unmatched_step_definitions available_step_definition_hash.keys - invoked_step_definition_hash.keys end
Private Instance Methods
available_step_definition_hash()
click to toggle source
# File lib/cucumber/language_support/language_methods.rb, line 54 def available_step_definition_hash @available_step_definition_hash ||= {} end
hooks()
click to toggle source
# File lib/cucumber/language_support/language_methods.rb, line 62 def hooks @hooks ||= Hash.new{|h,k| h[k] = []} end
invoked_step_definition_hash()
click to toggle source
# File lib/cucumber/language_support/language_methods.rb, line 58 def invoked_step_definition_hash @invoked_step_definition_hash ||= {} end
transforms()
click to toggle source
# File lib/cucumber/language_support/language_methods.rb, line 66 def transforms @transforms ||= [] end