Method: Puppet::Pops::Serialization::FromDataConverter.convert

Defined in:
lib/puppet/pops/serialization/from_data_converter.rb

.convert(value, options = EMPTY_HASH) ⇒ RichData

Converts the given ‘Data` value according to the given options and returns the resulting `RichData`.

Parameters:

  • value (Data)

    the value to convert

  • options (Symbol => <Boolean,String>) (defaults to: EMPTY_HASH)

    options hash

Options Hash (options):

  • :loader (Loaders::Loader)

    the loader to use. Can be ‘nil` in which case the default is determined by the Types::TypeParser.

  • :allow_unresolved (Boolean)

    ‘true` to allow that rich_data hashes are kept “as is” if the designated ’__ptype’ cannot be resolved. Defaults to ‘false`.

Returns:

  • (RichData)

    the processed result.



74
75
76
# File 'lib/puppet/pops/serialization/from_data_converter.rb', line 74

def self.convert(value, options = EMPTY_HASH)
  new(options).convert(value)
end