Class: Hocon::Impl::ConfigInt
- Inherits:
-
ConfigNumber
- Object
- ConfigNumber
- Hocon::Impl::ConfigInt
- Defined in:
- lib/hocon/impl/config_int.rb
Constant Summary
Constants included from AbstractConfigValue
AbstractConfigValue::ConfigBugOrBrokenError, AbstractConfigValue::ConfigImplUtil, AbstractConfigValue::ResolveStatus
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from ConfigNumber
Attributes included from AbstractConfigValue
Instance Method Summary collapse
- #double_value ⇒ Object
-
#initialize(origin, value, original_text) ⇒ ConfigInt
constructor
A new instance of ConfigInt.
- #long_value ⇒ Object
- #new_copy(origin) ⇒ Object
- #transform_to_string ⇒ Object
- #unwrapped ⇒ Object
- #value_type ⇒ Object
Methods inherited from ConfigNumber
#==, #can_equal, #hash, #int_value_range_checked, new_number
Methods included from AbstractConfigValue
#==, #at_key, #at_key_with_origin, #at_path, #at_path_with_origin, #can_equal, #construct_delayed_merge, #delay_merge, has_descendant_in_list?, #hash, #ignores_fallbacks?, indent, #inspect, #merged_stack_with_non_object, #merged_stack_with_object, #merged_stack_with_the_unmergeable, #merged_with_non_object, #merged_with_object, #merged_with_the_unmergeable, #relativized, #render, #render_to_sb, #render_value_to_sb, replace_child_in_list, #require_not_ignoring_fallbacks, #resolve_status, #resolve_substitutions, #to_fallback_value, #to_s, #with_fallback, #with_fallbacks_ignored, #with_origin
Methods included from ConfigValue
#at_key, #at_path, #origin, #render, #with_fallback, #with_origin
Methods included from ConfigMergeable
Constructor Details
#initialize(origin, value, original_text) ⇒ ConfigInt
Returns a new instance of ConfigInt.
8 9 10 11 |
# File 'lib/hocon/impl/config_int.rb', line 8 def initialize(origin, value, original_text) super(origin, original_text) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
13 14 15 |
# File 'lib/hocon/impl/config_int.rb', line 13 def value @value end |
Instance Method Details
#double_value ⇒ Object
36 37 38 |
# File 'lib/hocon/impl/config_int.rb', line 36 def double_value @value end |
#long_value ⇒ Object
32 33 34 |
# File 'lib/hocon/impl/config_int.rb', line 32 def long_value @value end |
#new_copy(origin) ⇒ Object
40 41 42 |
# File 'lib/hocon/impl/config_int.rb', line 40 def new_copy(origin) Hocon::Impl::ConfigInt.new(origin, @value, @original_text) end |
#transform_to_string ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/hocon/impl/config_int.rb', line 23 def transform_to_string s = super if s.nil? self.to_s else s end end |
#unwrapped ⇒ Object
19 20 21 |
# File 'lib/hocon/impl/config_int.rb', line 19 def unwrapped @value end |
#value_type ⇒ Object
15 16 17 |
# File 'lib/hocon/impl/config_int.rb', line 15 def value_type Hocon::ConfigValueType::NUMBER end |