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.



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

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

Instance Method Details

#==(other) ⇒ Object



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

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

#can_equal(other) ⇒ Object



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

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

#hashObject



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

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

#token_textObject



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

def token_text
  "\n"
end