Class: Rafflesia::DatabaseSnapshot

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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

#digestObject

Returns the value of attribute digest.



15
16
17
# File 'lib/rafflesia/annotations/database_snapshot.rb', line 15

def digest
  @digest
end

#kindObject

Returns the value of attribute kind.



15
16
17
# File 'lib/rafflesia/annotations/database_snapshot.rb', line 15

def kind
  @kind
end

#nameObject

Returns the value of attribute name.



15
16
17
# File 'lib/rafflesia/annotations/database_snapshot.rb', line 15

def name
  @name
end

#versionObject

Returns the value of attribute version.



15
16
17
# File 'lib/rafflesia/annotations/database_snapshot.rb', line 15

def version
  @version
end