Class: Puppet::Provider::OpnsenseSensitive

Inherits:
Puppet::Pops::Types::PSensitiveType::Sensitive
  • Object
show all
Defined in:
lib/puppet/provider/opnsense_sensitive.rb

Overview

A Puppet Language type that makes the OpnsenseSensitive Type comparable

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

  • other (Puppet::Pops::Types::PSensitiveType::Sensitive)

Returns:

  • (Boolean)


6
7
8
# File 'lib/puppet/provider/opnsense_sensitive.rb', line 6

def ==(other)
  return true if other.is_a?(Puppet::Pops::Types::PSensitiveType::Sensitive) && unwrap == other.unwrap
end

#encode_with(coder) ⇒ Object

The transactionstore uses psych to dump yaml to the cache file. This lets us control how that is serialized.

Parameters:

  • coder (Psych::Coder)


13
14
15
16
# File 'lib/puppet/provider/opnsense_sensitive.rb', line 13

def encode_with(coder)
  coder.tag = nil
  coder.scalar = 'Puppet::Provider::OpnsenseSensitive <<encrypted>>'
end