Class: Gherkin::I18nLexer
- Inherits:
-
Object
- Object
- Gherkin::I18nLexer
- Defined in:
- lib/gherkin/i18n_lexer.rb
Overview
The main entry point to lexing Gherkin source.
Constant Summary collapse
- LANGUAGE_PATTERN =
:nodoc:
/language\s*:\s*(.*)/
Instance Attribute Summary collapse
-
#i18n_language ⇒ Object
readonly
Returns the value of attribute i18n_language.
Instance Method Summary collapse
-
#initialize(listener, force_ruby = false) ⇒ I18nLexer
constructor
A new instance of I18nLexer.
- #scan(source) ⇒ Object
Constructor Details
#initialize(listener, force_ruby = false) ⇒ I18nLexer
Returns a new instance of I18nLexer.
15 16 17 18 |
# File 'lib/gherkin/i18n_lexer.rb', line 15 def initialize(listener, force_ruby=false) @listener = listener @force_ruby = force_ruby end |
Instance Attribute Details
#i18n_language ⇒ Object (readonly)
Returns the value of attribute i18n_language.
13 14 15 |
# File 'lib/gherkin/i18n_lexer.rb', line 13 def i18n_language @i18n_language end |
Instance Method Details
#scan(source) ⇒ Object
20 21 22 |
# File 'lib/gherkin/i18n_lexer.rb', line 20 def scan(source) create_delegate(source).scan(source) end |