Class: Cucumber::PySupport::PyLanguage

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/py_support/py_language.rb

Instance Method Summary collapse

Constructor Details

#initialize(step_mother) ⇒ PyLanguage

include LanguageSupport::LanguageMethods



8
9
10
11
12
13
14
15
16
# File 'lib/cucumber/py_support/py_language.rb', line 8

def initialize(step_mother)
  @python_path = ENV['PYTHONPATH'] ? ENV['PYTHONPATH'].split(':') : []
  add_to_python_path(File.dirname(__FILE__))

  RubyPython.start
  at_exit{RubyPython.stop}

  import(File.dirname(__FILE__) + '/py_language.py')
end

Instance Method Details

#alias_adverbs(adverbs) ⇒ Object



18
19
# File 'lib/cucumber/py_support/py_language.rb', line 18

def alias_adverbs(adverbs)
end

#snippet_text(step_keyword, step_name, multiline_arg_class = nil) ⇒ Object



25
26
27
# File 'lib/cucumber/py_support/py_language.rb', line 25

def snippet_text(step_keyword, step_name, multiline_arg_class = nil)
  "python snippet: #{step_keyword}, #{step_name}"
end

#step_definitions_for(py_file) ⇒ Object



21
22
23
# File 'lib/cucumber/py_support/py_language.rb', line 21

def step_definitions_for(py_file)
  mod = import(py_file)
end