Class: RSpec::Puppet::Sensitive
- Inherits:
-
Puppet::Pops::Types::PSensitiveType::Sensitive
- Object
- Puppet::Pops::Types::PSensitiveType::Sensitive
- RSpec::Puppet::Sensitive
- Defined in:
- lib/rspec-puppet/sensitive.rb,
lib/rspec-puppet/sensitive.rb
Overview
:nocov:
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(_value) ⇒ Sensitive
constructor
Create a new Sensitive object.
-
#inspect ⇒ Object
Inspect of the wrapped value, inside Sensitive().
-
#sensitive? ⇒ Boolean
True.
-
#unwrap ⇒ Object
The wrapped value.
Constructor Details
#initialize(_value) ⇒ Sensitive
Create a new Sensitive object
9 10 11 |
# File 'lib/rspec-puppet/sensitive.rb', line 9 def initialize(value) @value = value end |
Instance Method Details
#==(other) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/rspec-puppet/sensitive.rb', line 32 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 ⇒ Object
24 25 26 |
# File 'lib/rspec-puppet/sensitive.rb', line 24 def inspect "Sensitive(#{@value.inspect})" end |
#sensitive? ⇒ Boolean
19 20 21 |
# File 'lib/rspec-puppet/sensitive.rb', line 19 def sensitive? true end |
#unwrap ⇒ Object
14 15 16 |
# File 'lib/rspec-puppet/sensitive.rb', line 14 def unwrap @value end |