Class: CemAcpt::Config::Secret
- Inherits:
-
Object
- Object
- CemAcpt::Config::Secret
- Defined in:
- lib/cem_acpt/config/base.rb
Overview
Provides a wrapper for secret values. This is used to prevent secrets from being printed in logs or error messages.
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(key, value) ⇒ Secret
constructor
A new instance of Secret.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(key, value) ⇒ Secret
Returns a new instance of Secret.
21 22 23 24 |
# File 'lib/cem_acpt/config/base.rb', line 21 def initialize(key, value) @value = value @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
19 20 21 |
# File 'lib/cem_acpt/config/base.rb', line 19 def key @key end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
19 20 21 |
# File 'lib/cem_acpt/config/base.rb', line 19 def value @value end |
Instance Method Details
#inspect ⇒ Object
30 31 32 |
# File 'lib/cem_acpt/config/base.rb', line 30 def inspect "#<#{self.class}:#{object_id.to_s(16)} key=#{key} value=**** >" end |
#to_s ⇒ Object
26 27 28 |
# File 'lib/cem_acpt/config/base.rb', line 26 def to_s "Secret(#{key}=****)" end |