class Hocon::Impl::Tokens::Comment
Attributes
Public Class Methods
Source
# File lib/hocon/impl/tokens.rb, line 198 def initialize(origin, text) super(TokenType::COMMENT, origin) @text = text end
Calls superclass method
Public Instance Methods
Source
# File lib/hocon/impl/tokens.rb, line 237 def ==(other) super(other) && other.text == @text end
Calls superclass method
Source
# File lib/hocon/impl/tokens.rb, line 233 def can_equal(other) other.is_a?(Comment) end
Source
# File lib/hocon/impl/tokens.rb, line 241 def hash hashcode = 41 * (41 + super) hashcode = 41 * (hashcode + @text.hash) hashcode end
Calls superclass method
Source
# File lib/hocon/impl/tokens.rb, line 225 def to_s sb = StringIO.new sb << "'#" sb << text sb << "' (COMMENT)" sb.string end