Class: Rafflesia::DatabaseSnapshot
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DatabaseSnapshot
- Defined in:
- lib/rafflesia/annotations/database_snapshot.rb
Constant Summary collapse
- HASH_ATTRS =
{ digest: :digest, kind: :kind, name: :name, version: :version }.freeze
Instance Attribute Summary collapse
-
#digest ⇒ Object
Returns the value of attribute digest.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#name ⇒ Object
Returns the value of attribute name.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(json) ⇒ DatabaseSnapshot
constructor
A new instance of DatabaseSnapshot.
Constructor Details
#initialize(json) ⇒ DatabaseSnapshot
Returns a new instance of DatabaseSnapshot.
21 22 23 24 25 26 27 28 |
# File 'lib/rafflesia/annotations/database_snapshot.rb', line 21 def initialize(json) super() hash = self.class.normalize(json) @digest = hash[:digest] @kind = hash[:kind] @name = hash[:name] @version = hash[:version] end |
Instance Attribute Details
#digest ⇒ Object
Returns the value of attribute digest.
15 16 17 |
# File 'lib/rafflesia/annotations/database_snapshot.rb', line 15 def digest @digest end |
#kind ⇒ Object
Returns the value of attribute kind.
15 16 17 |
# File 'lib/rafflesia/annotations/database_snapshot.rb', line 15 def kind @kind end |
#name ⇒ Object
Returns the value of attribute name.
15 16 17 |
# File 'lib/rafflesia/annotations/database_snapshot.rb', line 15 def name @name end |
#version ⇒ Object
Returns the value of attribute version.
15 16 17 |
# File 'lib/rafflesia/annotations/database_snapshot.rb', line 15 def version @version end |