Class: Hocon::Impl::Tokens::IgnoredWhitespace
- Defined in:
- lib/hocon/impl/tokens.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #can_equal(o) ⇒ Object
- #hash ⇒ Object
-
#initialize(origin, s) ⇒ IgnoredWhitespace
constructor
A new instance of IgnoredWhitespace.
- #to_s ⇒ Object
- #token_text ⇒ Object
Constructor Details
#initialize(origin, s) ⇒ IgnoredWhitespace
Returns a new instance of IgnoredWhitespace.
110 111 112 113 |
# File 'lib/hocon/impl/tokens.rb', line 110 def initialize(origin, s) super(TokenType::IGNORED_WHITESPACE, origin) @value = s end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
114 115 116 |
# File 'lib/hocon/impl/tokens.rb', line 114 def value @value end |
Instance Method Details
#==(other) ⇒ Object
124 125 126 |
# File 'lib/hocon/impl/tokens.rb', line 124 def ==(other) super(other) && other.value == value end |
#can_equal(o) ⇒ Object
120 121 122 |
# File 'lib/hocon/impl/tokens.rb', line 120 def can_equal(o) o.is_a?(IgnoredWhitespace) end |
#hash ⇒ Object
128 129 130 |
# File 'lib/hocon/impl/tokens.rb', line 128 def hash 41 * (41 + super) + value.hash end |
#to_s ⇒ Object
116 117 118 |
# File 'lib/hocon/impl/tokens.rb', line 116 def to_s "'#{value}' (WHITESPACE)" end |
#token_text ⇒ Object
132 133 134 |
# File 'lib/hocon/impl/tokens.rb', line 132 def token_text @value end |