Class: Hocon::Impl::SimpleIncluder::RelativeNameSource
- Inherits:
-
NameSource
- Object
- NameSource
- Hocon::Impl::SimpleIncluder::RelativeNameSource
- Defined in:
- lib/hocon/impl/simple_includer.rb
Instance Method Summary collapse
-
#initialize(context) ⇒ RelativeNameSource
constructor
A new instance of RelativeNameSource.
- #name_to_parseable(name, options) ⇒ Object
Constructor Details
#initialize(context) ⇒ RelativeNameSource
Returns a new instance of RelativeNameSource.
110 111 112 |
# File 'lib/hocon/impl/simple_includer.rb', line 110 def initialize(context) @context = context end |
Instance Method Details
#name_to_parseable(name, options) ⇒ Object
114 115 116 117 118 119 120 121 122 |
# File 'lib/hocon/impl/simple_includer.rb', line 114 def name_to_parseable(name, ) p = @context.relative_to(name) if p.nil? # avoid returning nil Hocon::Impl::Parseable.new_not_found(name, "include was not found: '#{name}'", ) else p end end |