Class: Gherkin::Token

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#line ⇒ Object

Returns the value of attribute line

Returns:

  • (Object) —

    the current value of line



4
5
6
# File 'lib/gherkin/token.rb', line 4

def line
  @line
end

#location ⇒ Object

Returns the value of attribute location

Returns:

  • (Object) —

    the current value of location



4
5
6
# File 'lib/gherkin/token.rb', line 4

def location
  @location
end

#matched_gherkin_dialect ⇒ Object

Returns the value of attribute matched_gherkin_dialect.



5
6
7
# File 'lib/gherkin/token.rb', line 5

def matched_gherkin_dialect
  @matched_gherkin_dialect
end

#matched_indent ⇒ Object

Returns the value of attribute matched_indent.



5
6
7
# File 'lib/gherkin/token.rb', line 5

def matched_indent
  @matched_indent
end

#matched_items ⇒ Object

Returns the value of attribute matched_items.



5
6
7
# File 'lib/gherkin/token.rb', line 5

def matched_items
  @matched_items
end

#matched_keyword ⇒ Object

Returns the value of attribute matched_keyword.



5
6
7
# File 'lib/gherkin/token.rb', line 5

def matched_keyword
  @matched_keyword
end

#matched_keyword_type ⇒ Object

Returns the value of attribute matched_keyword_type.



5
6
7
# File 'lib/gherkin/token.rb', line 5

def matched_keyword_type
  @matched_keyword_type
end

#matched_text ⇒ Object

Returns the value of attribute matched_text.



5
6
7
# File 'lib/gherkin/token.rb', line 5

def matched_text
  @matched_text
end

#matched_type ⇒ Object

Returns the value of attribute matched_type.



5
6
7
# File 'lib/gherkin/token.rb', line 5

def matched_type
  @matched_type
end

Instance Method Details

#eof? ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/gherkin/token.rb', line 8

def eof?
  line.nil?
end

#token_value ⇒ Object



12
13
14
# File 'lib/gherkin/token.rb', line 12

def token_value
  eof? ? "EOF" : line.get_line_text(-1)
end