Class: Hocon::Impl::ConfigInt

Inherits:
ConfigNumber show all
Defined in:
lib/hocon/impl/config_int.rb

Constant Summary

Constants inherited from AbstractConfigValue

AbstractConfigValue::ConfigImplUtil

Instance Attribute Summary

Attributes inherited from AbstractConfigValue

#origin

Instance Method Summary collapse

Methods inherited from ConfigNumber

new_number

Methods inherited from AbstractConfigValue

#ignores_fallbacks?, #indent, #render, #render_to_sb, #render_value_to_sb, #require_not_ignoring_fallbacks, #resolve_status, #to_s, #with_fallback, #with_origin

Constructor Details

#initialize(origin, value, original_text) ⇒ ConfigInt

Returns a new instance of ConfigInt.



6
7
8
9
# File 'lib/hocon/impl/config_int.rb', line 6

def initialize(origin, value, original_text)
  super(origin, original_text)
  @value = value
end

Instance Method Details

#new_copy(origin) ⇒ Object



28
29
30
# File 'lib/hocon/impl/config_int.rb', line 28

def new_copy(origin)
  Hocon::Impl::ConfigInt.new(origin, @value, @original_text)
end

#transform_to_stringObject



19
20
21
22
23
24
25
26
# File 'lib/hocon/impl/config_int.rb', line 19

def transform_to_string
  s = super
  if s.nil?
    self.to_s
  else
    s
  end
end

#unwrappedObject



15
16
17
# File 'lib/hocon/impl/config_int.rb', line 15

def unwrapped
  @value
end

#value_typeObject



11
12
13
# File 'lib/hocon/impl/config_int.rb', line 11

def value_type
  Hocon::ConfigValueType::NUMBER
end