Class: Cucumber::PySupport::PyLanguage
Instance Method Summary
collapse
#add_hook, #add_transform, #after, #after_configuration, #around, #available_step_definition, #before, #clear_hooks, #execute_after_step, #execute_transforms, #hooks_for, #invoked_step_definition, #unmatched_step_definitions
Constructor Details
#initialize(runtime) ⇒ PyLanguage
Returns a new instance of PyLanguage.
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/cucumber/py_support/py_language.rb', line 8
def initialize(runtime)
@step_def_files = []
end
|
Instance Method Details
#alias_adverbs(adverbs) ⇒ Object
24
25
|
# File 'lib/cucumber/py_support/py_language.rb', line 24
def alias_adverbs(adverbs)
end
|
#begin_scenario(scenario) ⇒ Object
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/cucumber/py_support/py_language.rb', line 31
def begin_scenario(scenario)
@python_path = []
add_to_python_path(File.dirname(__FILE__))
@step_def_files.each { |f| add_to_python_path(File.dirname(f)) }
RubyPython.start
@delegate = import(File.dirname(__FILE__) + '/py_language.py')
@step_def_files.each { |f| import(f) }
end
|
#end_scenario ⇒ Object
42
43
|
# File 'lib/cucumber/py_support/py_language.rb', line 42
def end_scenario
end
|
#load_code_file(py_file) ⇒ Object
20
21
22
|
# File 'lib/cucumber/py_support/py_language.rb', line 20
def load_code_file(py_file)
@step_def_files << py_file
end
|
#snippet_text(code_keyword, step_name, multiline_arg_class, snippet_type) ⇒ Object
27
28
29
|
# File 'lib/cucumber/py_support/py_language.rb', line 27
def snippet_text(code_keyword, step_name, multiline_arg_class, snippet_type)
"python snippet: #{code_keyword}, #{step_name}"
end
|
#step_matches(step_name, name_to_report) ⇒ Object
45
46
47
|
# File 'lib/cucumber/py_support/py_language.rb', line 45
def step_matches(step_name, name_to_report)
@delegate.step_matches(step_name, name_to_report)
end
|