Class: Kamal::Utils::Sensitive
- Inherits:
-
Object
- Object
- Kamal::Utils::Sensitive
- Includes:
- SSHKit::Redaction
- Defined in:
- lib/kamal/utils/sensitive.rb
Instance Attribute Summary collapse
-
#redaction ⇒ Object
readonly
Returns the value of attribute redaction.
-
#unredacted ⇒ Object
readonly
Returns the value of attribute unredacted.
Instance Method Summary collapse
-
#encode_with(coder) ⇒ Object
Sensitive values won’t leak into YAML output.
-
#initialize(value, redaction: "[REDACTED]") ⇒ Sensitive
constructor
A new instance of Sensitive.
Constructor Details
#initialize(value, redaction: "[REDACTED]") ⇒ Sensitive
Returns a new instance of Sensitive.
12 13 14 |
# File 'lib/kamal/utils/sensitive.rb', line 12 def initialize(value, redaction: "[REDACTED]") @unredacted, @redaction = value, redaction end |
Instance Attribute Details
#redaction ⇒ Object (readonly)
Returns the value of attribute redaction.
8 9 10 |
# File 'lib/kamal/utils/sensitive.rb', line 8 def redaction @redaction end |
#unredacted ⇒ Object (readonly)
Returns the value of attribute unredacted.
8 9 10 |
# File 'lib/kamal/utils/sensitive.rb', line 8 def unredacted @unredacted end |
Instance Method Details
#encode_with(coder) ⇒ Object
Sensitive values won’t leak into YAML output.
17 18 19 |
# File 'lib/kamal/utils/sensitive.rb', line 17 def encode_with(coder) coder.represent_scalar nil, redaction end |