class Hocon::Impl::Parseable::ParseableString
NOTE: skipping ‘ParseableReader` until we know we need it (probably should
have done that with `ParseableNotFound`)
Public Class Methods
Source
# File lib/hocon/impl/parseable.rb, line 357 def initialize(string, options) super() @input = string post_construct(options) end
Calls superclass method
Hocon::Impl::Parseable::new
Public Instance Methods
Source
# File lib/hocon/impl/parseable.rb, line 382 def create_origin Hocon::Impl::SimpleConfigOrigin.new_simple("String") end
Source
# File lib/hocon/impl/parseable.rb, line 363 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
Source
# File lib/hocon/impl/parseable.rb, line 372 def open if block_given? StringIO.open(@input) do |f| yield f end else StringIO.open(@input) end end
Source
# File lib/hocon/impl/parseable.rb, line 386 def to_s "#{self.class.name.split('::').last} (#{@input})" end