Class: Puppet::Pops::Types::PSensitiveType::Sensitive

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/pops/types/p_sensitive_type.rb

Overview

API:

  • public

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Sensitive

Returns a new instance of Sensitive.

API:

  • public



12
13
14
# File 'lib/puppet/pops/types/p_sensitive_type.rb', line 12

def initialize(value)
  @value = value
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?

API:

  • public



32
33
34
35
# File 'lib/puppet/pops/types/p_sensitive_type.rb', line 32

def ==(other)
  other.is_a?(Sensitive) &&
    other.hash == hash
end

#hashObject

API:

  • public



28
29
30
# File 'lib/puppet/pops/types/p_sensitive_type.rb', line 28

def hash
  @value.hash
end

#inspectObject

API:

  • public



24
25
26
# File 'lib/puppet/pops/types/p_sensitive_type.rb', line 24

def inspect
  "#<#{self}>"
end

#to_sObject

API:

  • public



20
21
22
# File 'lib/puppet/pops/types/p_sensitive_type.rb', line 20

def to_s
  "Sensitive [value redacted]"
end

#unwrapObject

API:

  • public



16
17
18
# File 'lib/puppet/pops/types/p_sensitive_type.rb', line 16

def unwrap
  @value
end