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.
109 110 111 112 |
# File 'lib/hocon/impl/tokens.rb', line 109 def initialize(origin, s) super(TokenType::IGNORED_WHITESPACE, origin) @value = s end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
113 114 115 |
# File 'lib/hocon/impl/tokens.rb', line 113 def value @value end |
Instance Method Details
#==(other) ⇒ Object
123 124 125 |
# File 'lib/hocon/impl/tokens.rb', line 123 def ==(other) super(other) && other.value == value end |
#can_equal(o) ⇒ Object
119 120 121 |
# File 'lib/hocon/impl/tokens.rb', line 119 def can_equal(o) o.is_a?(IgnoredWhitespace) end |
#hash ⇒ Object
127 128 129 |
# File 'lib/hocon/impl/tokens.rb', line 127 def hash 41 * (41 + super) + value.hash end |
#to_s ⇒ Object
115 116 117 |
# File 'lib/hocon/impl/tokens.rb', line 115 def to_s "'#{value}' (WHITESPACE)" end |
#token_text ⇒ Object
131 132 133 |
# File 'lib/hocon/impl/tokens.rb', line 131 def token_text @value end |