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.
10 11 12 13 14 15 |
# File 'lib/hocon/config_parse_options.rb', line 10 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.
4 5 6 |
# File 'lib/hocon/config_parse_options.rb', line 4 def allow_missing @allow_missing end |
#includer ⇒ Object
Returns the value of attribute includer.
4 5 6 |
# File 'lib/hocon/config_parse_options.rb', line 4 def includer @includer end |
#origin_description ⇒ Object
Returns the value of attribute origin_description.
4 5 6 |
# File 'lib/hocon/config_parse_options.rb', line 4 def origin_description @origin_description end |
#syntax ⇒ Object
Returns the value of attribute syntax.
4 5 6 |
# File 'lib/hocon/config_parse_options.rb', line 4 def syntax @syntax end |
Class Method Details
.defaults ⇒ Object
6 7 8 |
# File 'lib/hocon/config_parse_options.rb', line 6 def self.defaults self.new(nil, nil, true, nil) end |
Instance Method Details
#allow_missing? ⇒ Boolean
17 18 19 |
# File 'lib/hocon/config_parse_options.rb', line 17 def allow_missing? @allow_missing end |
#append_includer(includer) ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'lib/hocon/config_parse_options.rb', line 43 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
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/hocon/config_parse_options.rb', line 32 def with_includer(includer) if @includer == includer self else Hocon::ConfigParseOptions.new(@syntax, @origin_description, @allow_missing, includer) end end |
#with_syntax(syntax) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/hocon/config_parse_options.rb', line 21 def with_syntax(syntax) if @syntax == syntax self else Hocon::ConfigParseOptions.new(syntax, @origin_description, @allow_missing, @includer) end end |