Module: Cucumber::Gherkin::I18n

Defined in:
lib/cucumber/gherkin/i18n.rb

Class Method Summary collapse

Class Method Details

.code_keyword_for(gherkin_keyword) ⇒ Object



7
8
9
# File 'lib/cucumber/gherkin/i18n.rb', line 7

def code_keyword_for(gherkin_keyword)
  gherkin_keyword.gsub(/[\s',!]/, '').strip
end

.code_keywords_for(gherkin_keywords) ⇒ Object



11
12
13
# File 'lib/cucumber/gherkin/i18n.rb', line 11

def code_keywords_for(gherkin_keywords)
  gherkin_keywords.reject { |kw| kw == '* ' }.map { |kw| code_keyword_for(kw) }
end