Class: Lucid::AST::StepInvocation::Keywords
- Includes:
- Gherkin::Rubify
- Defined in:
- lib/lucid/ast/step_invocation.rb
Instance Method Summary collapse
-
#initialize(language) ⇒ Keywords
constructor
A new instance of Keywords.
- #repeat_keyword?(keyword) ⇒ Boolean
- #star_code_keyword ⇒ Object
Constructor Details
#initialize(language) ⇒ Keywords
Returns a new instance of Keywords.
144 145 146 |
# File 'lib/lucid/ast/step_invocation.rb', line 144 def initialize(language) @language = language end |
Instance Method Details
#repeat_keyword?(keyword) ⇒ Boolean
148 149 150 |
# File 'lib/lucid/ast/step_invocation.rb', line 148 def repeat_keyword?(keyword) repeat_keywords.index(keyword) end |
#star_code_keyword ⇒ Object
152 153 154 |
# File 'lib/lucid/ast/step_invocation.rb', line 152 def star_code_keyword language.code_keywords.reject { |k| repeat_keywords.map(&:strip).include?(k) }.first end |