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
7 8 9 |
# File 'lib/rspec-puppet/sensitive.rb', line 7 def initialize(value) @value = value end |
Instance Method Details
#==(other) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/rspec-puppet/sensitive.rb', line 30 def == other if other.respond_to? :unwrap return unwrap == other.unwrap else super end end |
#inspect ⇒ Object
Returns inspect of the wrapped value, inside Sensitive().
22 23 24 |
# File 'lib/rspec-puppet/sensitive.rb', line 22 def inspect "Sensitive(#{@value.inspect})" end |
#sensitive? ⇒ Boolean
Returns true.
17 18 19 |
# File 'lib/rspec-puppet/sensitive.rb', line 17 def sensitive? true end |
#unwrap ⇒ Object
Returns the wrapped value.
12 13 14 |
# File 'lib/rspec-puppet/sensitive.rb', line 12 def unwrap @value end |