lib/puppet/provider/registry_value/registry.rb
# convert from native type and data to puppet
convert from native type and data to puppet
convert from native type and data to puppet
def from_native(ary)
    ntype, ndata = ary
    pdata =
      case type2name(ntype)
      when :binary
        ndata.bytes.map{ |byte| "%02x" % byte }.join(' ')
      when :array
        ndata
      else
        ndata
      end
    return [type2name(ntype), pdata.kind_of?(Array) ? pdata : [pdata]]
  end
def from_native ( ary ) ntype , ndata = ary pdata = case type2name ( ntype ) when :binary ndata . bytes . map { | byte | "%02x" % byte } . join ( ' ' ) when :array ndata else ndata end return [ type2name ( ntype ) , pdata . kind_of? ( Array ) ? pdata : [ pdata ] ] end
convert from native type and data to puppet
convert from native type and data to puppet
# We get the data from the registry in Array form. # JJM Since the data property is set to :array_matching => all we should # always give an array to Puppet.  This is why we have the ternary operator # I'm not calling .to_a because Ruby issues a warning about the default # implementation of to_a going away in the future.
ary
<not_specific>