Class: Hocon::ConfigResolveOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/hocon/config_resolve_options.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(use_system_environment, allow_unresolved) ⇒ ConfigResolveOptions

Returns a new instance of ConfigResolveOptions.



8
9
10
11
# File 'lib/hocon/config_resolve_options.rb', line 8

def initialize(use_system_environment, allow_unresolved)
  @use_system_environment = use_system_environment
  @allow_unresolved = allow_unresolved
end

Instance Attribute Details

#allow_unresolvedObject (readonly)

Returns the value of attribute allow_unresolved.



6
7
8
# File 'lib/hocon/config_resolve_options.rb', line 6

def allow_unresolved
  @allow_unresolved
end

#use_system_environmentObject (readonly)

Returns the value of attribute use_system_environment.



6
7
8
# File 'lib/hocon/config_resolve_options.rb', line 6

def use_system_environment
  @use_system_environment
end

Class Method Details

.defaultsObject



23
24
25
# File 'lib/hocon/config_resolve_options.rb', line 23

def defaults
  self.new(true, false)
end

.no_systemObject



27
28
29
# File 'lib/hocon/config_resolve_options.rb', line 27

def no_system
  defaults.set_use_system_environment(false)
end

Instance Method Details

#set_allow_unresolved(value) ⇒ Object



17
18
19
# File 'lib/hocon/config_resolve_options.rb', line 17

def set_allow_unresolved(value)
  self.class.new(@use_system_environment, value)
end

#set_use_system_environment(value) ⇒ Object



13
14
15
# File 'lib/hocon/config_resolve_options.rb', line 13

def set_use_system_environment(value)
  self.class.new(value, @allow_unresolved)
end