Class: Hocon::Impl::Parseable::ParseableNotFound

Inherits:
Hocon::Impl::Parseable show all
Defined in:
lib/hocon/impl/parseable.rb

Overview

this is a parseable that doesn’t exist and just throws when you try to parse it

Constant Summary

Constants inherited from Hocon::Impl::Parseable

MAX_INCLUDE_DEPTH

Instance Method Summary collapse

Methods inherited from Hocon::Impl::Parseable

#content_type, #fixup_options, force_parsed_to_object, #guess_syntax, #include_context, new_file, new_not_found, new_resources, new_string, #options, #origin, #parse, #parse_config_document, #parse_document, #parse_document_from_origin, #parse_value, #parse_value_from_origin, #post_construct, #raw_parse_document, #raw_parse_document_from_io, #raw_parse_value, #raw_parse_value_from_io, #reader, relative_to, #relative_to, syntax_from_extension, #to_s, trace

Methods included from ConfigParseable

#options, #origin, #parse

Constructor Details

#initialize(what, message, options) ⇒ ParseableNotFound

Returns a new instance of ParseableNotFound.



332
333
334
335
336
337
# File 'lib/hocon/impl/parseable.rb', line 332

def initialize(what, message, options)
  super()
  @what = what
  @message = message
  post_construct(options)
end

Instance Method Details

#create_originObject



343
344
345
# File 'lib/hocon/impl/parseable.rb', line 343

def create_origin
  Hocon::Impl::SimpleConfigOrigin.new_simple(@what)
end

#custom_readerObject



339
340
341
# File 'lib/hocon/impl/parseable.rb', line 339

def custom_reader
  raise Hocon::ConfigError::ConfigBugOrBrokenError, @message
end