NOTE: skipping `ParseableReader` until we know we need it (probably should
have done that with `ParseableNotFound`)
# File lib/hocon/impl/parseable.rb, line 354 def initialize(string, options) super() @input = string post_construct(options) end
# File lib/hocon/impl/parseable.rb, line 379 def create_origin Hocon::Impl::SimpleConfigOrigin.new_simple("String") end
# File lib/hocon/impl/parseable.rb, line 360 def custom_reader if Hocon::Impl::ConfigImpl.trace_loads_enabled self.class.trace("Loading config from a String: #{@input}") end # we return self here, which will cause `open` to be called on us, so # we can provide an implementation of that. self end
# File lib/hocon/impl/parseable.rb, line 369 def open if block_given? StringIO.open(@input) do |f| yield f end else StringIO.open(@input) end end
# File lib/hocon/impl/parseable.rb, line 383 def to_s "#{self.class.name.split('::').last} (#{@input})" end