class RSpec::Puppet::Sensitive
A wrapper representing Sensitive
data type, eg. in class params.
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 8 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 31 def ==(other) if other.respond_to? :unwrap if unwrap.is_a?(Regexp) unwrap =~ other.unwrap else 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 23 def inspect "Sensitive(#{@value.inspect})" end
sensitive?()
click to toggle source
@return true
# File lib/rspec-puppet/sensitive.rb, line 18 def sensitive? true end
unwrap()
click to toggle source
@return the wrapped value
# File lib/rspec-puppet/sensitive.rb, line 13 def unwrap @value end