Class: Hocon::Impl::Tokens::Line

Inherits:
Token
  • Object
show all
Defined in:
lib/hocon/impl/tokens.rb

Instance Method Summary collapse

Constructor Details

#initialize(origin) ⇒ Line

Returns a new instance of Line.



60
61
62
# File 'lib/hocon/impl/tokens.rb', line 60

def initialize(origin)
  super(TokenType::NEWLINE, origin)
end

Instance Method Details

#==(other) ⇒ Object



68
69
70
# File 'lib/hocon/impl/tokens.rb', line 68

def ==(other)
  super(other) && other.line_number == line_number
end

#can_equal(other) ⇒ Object



64
65
66
# File 'lib/hocon/impl/tokens.rb', line 64

def can_equal(other)
  o.is_a?(Line)
end

#hashObject



72
73
74
# File 'lib/hocon/impl/tokens.rb', line 72

def hash
  41 * (41 + super) + line_number
end

#token_textObject



76
77
78
# File 'lib/hocon/impl/tokens.rb', line 76

def token_text
  "\n"
end