Class: Yast2::SecretAttributes::Attribute
- Inherits:
-
Object
- Object
- Yast2::SecretAttributes::Attribute
- Defined in:
- library/general/src/lib/yast2/secret_attributes.rb
Overview
Inner class to store the value of the attribute without exposing it directly
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value) ⇒ Attribute
constructor
A new instance of Attribute.
- #inspect ⇒ Object
- #instance_variables ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(value) ⇒ Attribute
Returns a new instance of Attribute.
30 31 32 |
# File 'library/general/src/lib/yast2/secret_attributes.rb', line 30 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
28 29 30 |
# File 'library/general/src/lib/yast2/secret_attributes.rb', line 28 def value @value end |
Instance Method Details
#inspect ⇒ Object
38 39 40 |
# File 'library/general/src/lib/yast2/secret_attributes.rb', line 38 def inspect value.nil? ? "nil" : "<secret>" end |
#instance_variables ⇒ Object
42 43 44 45 46 |
# File 'library/general/src/lib/yast2/secret_attributes.rb', line 42 def instance_variables # This adds even an extra barrier, just in case some formatter tries to # use deep instrospection [] end |
#to_s ⇒ Object
34 35 36 |
# File 'library/general/src/lib/yast2/secret_attributes.rb', line 34 def to_s value.nil? ? "" : "<secret>" end |