Class: Gherkin::TokenFormatterBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/gherkin/token_formatter_builder.rb

Instance Method Summary collapse

Constructor Details

#initializeTokenFormatterBuilder

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_resultObject



19
20
21
# File 'lib/gherkin/token_formatter_builder.rb', line 19

def get_result
  @tokens_text
end

#resetObject



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