Class: Hocon::Impl::ConfigDouble
Constant Summary
AbstractConfigValue::ConfigBugOrBrokenError, AbstractConfigValue::ConfigImplUtil, AbstractConfigValue::ResolveStatus
Instance Attribute Summary collapse
Attributes inherited from ConfigNumber
#original_text
#origin
Instance Method Summary
collapse
#==, #can_equal, #hash, #int_value_range_checked, new_number
#==, #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
#at_key, #at_path, #origin, #render, #with_fallback, #with_origin
#with_fallback
Constructor Details
#initialize(origin, value, original_text) ⇒ ConfigDouble
7
8
9
10
|
# File 'lib/hocon/impl/config_double.rb', line 7
def initialize(origin, value, original_text)
super(origin, original_text)
@value = value
end
|
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
12
13
14
|
# File 'lib/hocon/impl/config_double.rb', line 12
def value
@value
end
|
Instance Method Details
#double_value ⇒ Object
35
36
37
|
# File 'lib/hocon/impl/config_double.rb', line 35
def double_value
@value
end
|
#long_value ⇒ Object
31
32
33
|
# File 'lib/hocon/impl/config_double.rb', line 31
def long_value
@value.to_i
end
|
#new_copy(origin) ⇒ Object
39
40
41
|
# File 'lib/hocon/impl/config_double.rb', line 39
def new_copy(origin)
self.class.new(origin, @value, original_text)
end
|
22
23
24
25
26
27
28
29
|
# File 'lib/hocon/impl/config_double.rb', line 22
def transform_to_string
s = super
if s.nil?
@value.to_s
else
s
end
end
|
#unwrapped ⇒ Object
18
19
20
|
# File 'lib/hocon/impl/config_double.rb', line 18
def unwrapped
@value
end
|
#value_type ⇒ Object
14
15
16
|
# File 'lib/hocon/impl/config_double.rb', line 14
def value_type
Hocon::ConfigValueType::NUMBER
end
|