Class: Attentive::Tokens::Whitespace
- Inherits:
-
StringToken
- Object
- Attentive::Token
- StringToken
- Attentive::Tokens::Whitespace
- Defined in:
- lib/attentive/tokens/whitespace.rb
Instance Attribute Summary
Attributes inherited from StringToken
Attributes inherited from Attentive::Token
Instance Method Summary collapse
-
#==(other) ⇒ Object
All whitespace is equal.
- #skippable? ⇒ Boolean
- #whitespace? ⇒ Boolean
Methods inherited from StringToken
#eql?, #hash, #initialize, #length, #to_s, #to_str
Methods inherited from Attentive::Token
#ambiguous?, #end, #entity?, #eof?, #initialize, #inspect, #matches?
Constructor Details
This class inherits a constructor from Attentive::StringToken
Instance Method Details
#==(other) ⇒ Object
All whitespace is equal
8 9 10 |
# File 'lib/attentive/tokens/whitespace.rb', line 8 def ==(other) self.class == other.class end |
#skippable? ⇒ Boolean
12 13 14 |
# File 'lib/attentive/tokens/whitespace.rb', line 12 def skippable? true end |
#whitespace? ⇒ Boolean
16 17 18 |
# File 'lib/attentive/tokens/whitespace.rb', line 16 def whitespace? true end |