Class: Rafflesia::RegistrySourceRef
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::RegistrySourceRef
- 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
-
#path ⇒ Object
Returns the value of attribute path.
-
#role ⇒ Object
Returns the value of attribute role.
-
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
Instance Method Summary collapse
-
#initialize(json) ⇒ RegistrySourceRef
constructor
A new instance of RegistrySourceRef.
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
#path ⇒ Object
Returns the value of attribute path.
14 15 16 |
# File 'lib/rafflesia/registry/registry_source_ref.rb', line 14 def path @path end |
#role ⇒ Object
Returns the value of attribute role.
14 15 16 |
# File 'lib/rafflesia/registry/registry_source_ref.rb', line 14 def role @role end |
#sha_256 ⇒ Object
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 |