Class: Lucid::AST::StepInvocation::Keywords

Inherits:
Object
  • Object
show all
Includes:
Gherkin::Rubify
Defined in:
lib/lucid/ast/step_invocation.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


148
149
150
# File 'lib/lucid/ast/step_invocation.rb', line 148

def repeat_keyword?(keyword)
  repeat_keywords.index(keyword)
end

#star_code_keywordObject



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