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



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

def end_rule(rule_type)
end

#get_resultObject



21
22
23
# File 'lib/gherkin/token_formatter_builder.rb', line 21

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
16
# File 'lib/gherkin/token_formatter_builder.rb', line 15

def start_rule(rule_type)
end