Class: Gherkin::TokenFormatterBuilder
- Inherits:
-
Object
- Object
- Gherkin::TokenFormatterBuilder
- Defined in:
- lib/gherkin/token_formatter_builder.rb
Instance Method Summary collapse
- #build(token) ⇒ Object
- #end_rule(_rule_type) ⇒ Object
- #get_result ⇒ Object
-
#initialize ⇒ TokenFormatterBuilder
constructor
A new instance of TokenFormatterBuilder.
- #reset ⇒ Object
- #start_rule(_rule_type) ⇒ Object
Constructor Details
#initialize ⇒ TokenFormatterBuilder
Returns a new instance of TokenFormatterBuilder.
3 4 5 |
# File 'lib/gherkin/token_formatter_builder.rb', line 3 def initialize reset end |
Instance Method Details
#build(token) ⇒ Object
11 12 13 |
# File 'lib/gherkin/token_formatter_builder.rb', line 11 def build(token) @tokens_text << "#{format_token(token)}\n" end |
#end_rule(_rule_type) ⇒ Object
17 |
# File 'lib/gherkin/token_formatter_builder.rb', line 17 def end_rule(_rule_type); end |
#get_result ⇒ Object
19 20 21 |
# File 'lib/gherkin/token_formatter_builder.rb', line 19 def get_result @tokens_text end |
#reset ⇒ Object
7 8 9 |
# File 'lib/gherkin/token_formatter_builder.rb', line 7 def reset @tokens_text = '' end |
#start_rule(_rule_type) ⇒ Object
15 |
# File 'lib/gherkin/token_formatter_builder.rb', line 15 def start_rule(_rule_type); end |