Class: Rafflesia::OntologySnapshotListData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::OntologySnapshotListData
- Defined in:
- lib/rafflesia/ontology/ontology_snapshot_list_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ available_count: :available_count, available_digests: :available_digests, current_digest: :current_digest, data: :data, is_remote: :is_remote, object: :object, storage_backend: :storage_backend, url: :url }.freeze
Instance Attribute Summary collapse
-
#available_count ⇒ Object
Returns the value of attribute available_count.
-
#available_digests ⇒ Object
Returns the value of attribute available_digests.
-
#current_digest ⇒ Object
Returns the value of attribute current_digest.
-
#data ⇒ Object
Returns the value of attribute data.
-
#is_remote ⇒ Object
Returns the value of attribute is_remote.
-
#object ⇒ Object
Returns the value of attribute object.
-
#storage_backend ⇒ Object
Returns the value of attribute storage_backend.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(json) ⇒ OntologySnapshotListData
constructor
A new instance of OntologySnapshotListData.
Constructor Details
#initialize(json) ⇒ OntologySnapshotListData
Returns a new instance of OntologySnapshotListData.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rafflesia/ontology/ontology_snapshot_list_data.rb', line 29 def initialize(json) super() hash = self.class.normalize(json) @available_count = hash[:available_count] @available_digests = (hash[:available_digests] || []) @current_digest = hash[:current_digest] @data = (hash[:data] || []).map { |item| item ? Rafflesia::OntologySnapshotSummaryData.new(item) : nil } @is_remote = hash[:is_remote] @object = hash[:object] @storage_backend = hash[:storage_backend] @url = hash[:url] end |
Instance Attribute Details
#available_count ⇒ Object
Returns the value of attribute available_count.
19 20 21 |
# File 'lib/rafflesia/ontology/ontology_snapshot_list_data.rb', line 19 def available_count @available_count end |
#available_digests ⇒ Object
Returns the value of attribute available_digests.
19 20 21 |
# File 'lib/rafflesia/ontology/ontology_snapshot_list_data.rb', line 19 def available_digests @available_digests end |
#current_digest ⇒ Object
Returns the value of attribute current_digest.
19 20 21 |
# File 'lib/rafflesia/ontology/ontology_snapshot_list_data.rb', line 19 def current_digest @current_digest end |
#data ⇒ Object
Returns the value of attribute data.
19 20 21 |
# File 'lib/rafflesia/ontology/ontology_snapshot_list_data.rb', line 19 def data @data end |
#is_remote ⇒ Object
Returns the value of attribute is_remote.
19 20 21 |
# File 'lib/rafflesia/ontology/ontology_snapshot_list_data.rb', line 19 def is_remote @is_remote end |
#object ⇒ Object
Returns the value of attribute object.
19 20 21 |
# File 'lib/rafflesia/ontology/ontology_snapshot_list_data.rb', line 19 def object @object end |
#storage_backend ⇒ Object
Returns the value of attribute storage_backend.
19 20 21 |
# File 'lib/rafflesia/ontology/ontology_snapshot_list_data.rb', line 19 def storage_backend @storage_backend end |
#url ⇒ Object
Returns the value of attribute url.
19 20 21 |
# File 'lib/rafflesia/ontology/ontology_snapshot_list_data.rb', line 19 def url @url end |