class RSpec::Puppet::Sensitive
A wrapper representing Sensitive
data type, eg. in class params.
:nocov:
Public Class Methods
new(value)
click to toggle source
Create a new Sensitive
object @param [Object] value to wrap
# File lib/rspec-puppet/sensitive.rb, line 7 def initialize(value) @value = value end
Public Instance Methods
==(other)
click to toggle source
@param other [#unwrap, Object] value to compare to
Calls superclass method
# File lib/rspec-puppet/sensitive.rb, line 30 def == other if other.respond_to? :unwrap if unwrap.kind_of?(Regexp) return unwrap =~ other.unwrap else return unwrap == other.unwrap end else super end end
inspect()
click to toggle source
@return inspect of the wrapped value, inside Sensitive()
# File lib/rspec-puppet/sensitive.rb, line 22 def inspect "Sensitive(#{@value.inspect})" end
sensitive?()
click to toggle source
@return true
# File lib/rspec-puppet/sensitive.rb, line 17 def sensitive? true end
unwrap()
click to toggle source
@return the wrapped value
# File lib/rspec-puppet/sensitive.rb, line 12 def unwrap @value end