Class: Retab::Secret
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::Secret
- Defined in:
- lib/retab/secrets/secret.rb
Constant Summary collapse
- HASH_ATTRS =
{ name: :name, created_at: :created_at, updated_at: :updated_at, created_by: :created_by, updated_by: :updated_by }.freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#created_by ⇒ Object
Returns the value of attribute created_by.
-
#name ⇒ Object
Returns the value of attribute name.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#updated_by ⇒ Object
Returns the value of attribute updated_by.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ Secret
constructor
A new instance of Secret.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ Secret
Returns a new instance of Secret.
24 25 26 27 28 29 30 31 32 |
# File 'lib/retab/secrets/secret.rb', line 24 def initialize(json) super() hash = self.class.normalize(json) @name = hash[:name] @created_at = hash[:created_at] @updated_at = hash[:updated_at] @created_by = hash[:created_by] @updated_by = hash[:updated_by] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
16 17 18 |
# File 'lib/retab/secrets/secret.rb', line 16 def created_at @created_at end |
#created_by ⇒ Object
Returns the value of attribute created_by.
16 17 18 |
# File 'lib/retab/secrets/secret.rb', line 16 def created_by @created_by end |
#name ⇒ Object
Returns the value of attribute name.
16 17 18 |
# File 'lib/retab/secrets/secret.rb', line 16 def name @name end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
16 17 18 |
# File 'lib/retab/secrets/secret.rb', line 16 def updated_at @updated_at end |
#updated_by ⇒ Object
Returns the value of attribute updated_by.
16 17 18 |
# File 'lib/retab/secrets/secret.rb', line 16 def updated_by @updated_by end |