Class: Hocon::ConfigParseOptions
- Inherits:
-
Object
- Object
- Hocon::ConfigParseOptions
- Defined in:
- lib/hocon/config_parse_options.rb
Instance Attribute Summary collapse
-
#allow_missing ⇒ Object
Returns the value of attribute allow_missing.
-
#includer ⇒ Object
Returns the value of attribute includer.
-
#origin_description ⇒ Object
Returns the value of attribute origin_description.
-
#syntax ⇒ Object
Returns the value of attribute syntax.
Class Method Summary collapse
Instance Method Summary collapse
- #allow_missing? ⇒ Boolean
- #append_includer(includer) ⇒ Object
-
#initialize(syntax, origin_description, allow_missing, includer) ⇒ ConfigParseOptions
constructor
A new instance of ConfigParseOptions.
- #with_includer(includer) ⇒ Object
- #with_syntax(syntax) ⇒ Object
Constructor Details
#initialize(syntax, origin_description, allow_missing, includer) ⇒ ConfigParseOptions
Returns a new instance of ConfigParseOptions.
9 10 11 12 13 14 |
# File 'lib/hocon/config_parse_options.rb', line 9 def initialize(syntax, origin_description, allow_missing, includer) @syntax = syntax @origin_description = origin_description @allow_missing = allow_missing @includer = includer end |
Instance Attribute Details
#allow_missing ⇒ Object
Returns the value of attribute allow_missing.
3 4 5 |
# File 'lib/hocon/config_parse_options.rb', line 3 def allow_missing @allow_missing end |
#includer ⇒ Object
Returns the value of attribute includer.
3 4 5 |
# File 'lib/hocon/config_parse_options.rb', line 3 def includer @includer end |
#origin_description ⇒ Object
Returns the value of attribute origin_description.
3 4 5 |
# File 'lib/hocon/config_parse_options.rb', line 3 def origin_description @origin_description end |
#syntax ⇒ Object
Returns the value of attribute syntax.
3 4 5 |
# File 'lib/hocon/config_parse_options.rb', line 3 def syntax @syntax end |
Class Method Details
.defaults ⇒ Object
5 6 7 |
# File 'lib/hocon/config_parse_options.rb', line 5 def self.defaults self.new(nil, nil, true, nil) end |
Instance Method Details
#allow_missing? ⇒ Boolean
16 17 18 |
# File 'lib/hocon/config_parse_options.rb', line 16 def allow_missing? @allow_missing end |
#append_includer(includer) ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/hocon/config_parse_options.rb', line 42 def append_includer(includer) if @includer == includer self elsif @includer with_includer(@includer.with_fallback(includer)) else with_includer(includer) end end |
#with_includer(includer) ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/hocon/config_parse_options.rb', line 31 def with_includer(includer) if @includer == includer self else Hocon::ConfigParseOptions.new(@syntax, @origin_description, @allow_missing, includer) end end |
#with_syntax(syntax) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/hocon/config_parse_options.rb', line 20 def with_syntax(syntax) if @syntax == syntax self else Hocon::ConfigParseOptions.new(syntax, @origin_description, @allow_missing, @includer) end end |