Class: Rafflesia::RegistrySourceRef

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/registry/registry_source_ref.rb

Constant Summary collapse

HASH_ATTRS =
{
  path: :path,
  role: :role,
  sha256: :sha_256
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ RegistrySourceRef

Returns a new instance of RegistrySourceRef.



19
20
21
22
23
24
25
# File 'lib/rafflesia/registry/registry_source_ref.rb', line 19

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @path = hash[:path]
  @role = hash[:role]
  @sha_256 = hash[:sha256]
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



14
15
16
# File 'lib/rafflesia/registry/registry_source_ref.rb', line 14

def path
  @path
end

#roleObject

Returns the value of attribute role.



14
15
16
# File 'lib/rafflesia/registry/registry_source_ref.rb', line 14

def role
  @role
end

#sha_256Object

Returns the value of attribute sha_256.



14
15
16
# File 'lib/rafflesia/registry/registry_source_ref.rb', line 14

def sha_256
  @sha_256
end