Class: Hocon::Impl::Tokens::Value

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Value

Returns a new instance of Value.



55
56
57
58
# File 'lib/hocon/impl/tokens.rb', line 55

def initialize(value)
  super(TokenType::VALUE, value.origin)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end

Instance Method Details

#to_sObject



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

def to_s
  "'#{value.unwrapped}' (#{Hocon::ConfigValueType.name(value.value_type)})"
end