Class: Rafflesia::RegistrySourceSnapshot

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/foundry/registry_source_snapshot.rb

Constant Summary collapse

HASH_ATTRS =
{
  content_digest: :content_digest,
  name: :name,
  provider: :provider,
  sha256: :sha_256,
  source_uri: :source_uri,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ RegistrySourceSnapshot

Returns a new instance of RegistrySourceSnapshot.



25
26
27
28
29
30
31
32
33
34
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 25

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @content_digest = hash[:content_digest]
  @name = hash[:name]
  @provider = hash[:provider]
  @sha_256 = hash[:sha256]
  @source_uri = hash[:source_uri]
  @version = hash[:version]
end

Instance Attribute Details

#content_digestObject

Returns the value of attribute content_digest.



17
18
19
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 17

def content_digest
  @content_digest
end

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 17

def name
  @name
end

#providerObject

Returns the value of attribute provider.



17
18
19
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 17

def provider
  @provider
end

#sha_256Object

Returns the value of attribute sha_256.



17
18
19
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 17

def sha_256
  @sha_256
end

#source_uriObject

Returns the value of attribute source_uri.



17
18
19
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 17

def source_uri
  @source_uri
end

#versionObject

Returns the value of attribute version.



17
18
19
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 17

def version
  @version
end