Class: Puppet::Pops::Types::PSensitiveType::Sensitive
- Defined in:
- lib/puppet/pops/types/p_sensitive_type.rb
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(value) ⇒ Sensitive
constructor
A new instance of Sensitive.
- #inspect ⇒ Object
- #to_s ⇒ Object
- #unwrap ⇒ Object
Constructor Details
#initialize(value) ⇒ Sensitive
Returns a new instance of Sensitive.
13 14 15 |
# File 'lib/puppet/pops/types/p_sensitive_type.rb', line 13 def initialize(value) @value = value end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
33 34 35 36 |
# File 'lib/puppet/pops/types/p_sensitive_type.rb', line 33 def ==(other) other.is_a?(Sensitive) && other.hash == hash end |
#hash ⇒ Object
29 30 31 |
# File 'lib/puppet/pops/types/p_sensitive_type.rb', line 29 def hash @value.hash end |
#inspect ⇒ Object
25 26 27 |
# File 'lib/puppet/pops/types/p_sensitive_type.rb', line 25 def inspect "#<#{self}>" end |
#to_s ⇒ Object
21 22 23 |
# File 'lib/puppet/pops/types/p_sensitive_type.rb', line 21 def to_s "Sensitive [value redacted]" end |
#unwrap ⇒ Object
17 18 19 |
# File 'lib/puppet/pops/types/p_sensitive_type.rb', line 17 def unwrap @value end |