Class: Rafflesia::CorpuReleaseHistoryData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CorpuReleaseHistoryData
- Defined in:
- lib/rafflesia/datasets/corpu_release_history_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ backend: :backend, corpus: :corpus, current_object: :current_object, current_ref: :current_ref, current_version: :current_version, entries: :entries, entry_count: :entry_count, object_store_root: :object_store_root }.freeze
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#corpus ⇒ Object
Returns the value of attribute corpus.
-
#current_object ⇒ Object
Returns the value of attribute current_object.
-
#current_ref ⇒ Object
Returns the value of attribute current_ref.
-
#current_version ⇒ Object
Returns the value of attribute current_version.
-
#entries ⇒ Object
Returns the value of attribute entries.
-
#entry_count ⇒ Object
Returns the value of attribute entry_count.
-
#object_store_root ⇒ Object
Returns the value of attribute object_store_root.
Instance Method Summary collapse
-
#initialize(json) ⇒ CorpuReleaseHistoryData
constructor
A new instance of CorpuReleaseHistoryData.
Constructor Details
#initialize(json) ⇒ CorpuReleaseHistoryData
Returns a new instance of CorpuReleaseHistoryData.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rafflesia/datasets/corpu_release_history_data.rb', line 29 def initialize(json) super() hash = self.class.normalize(json) @backend = hash[:backend] @corpus = hash[:corpus] @current_object = hash[:current_object] @current_ref = hash[:current_ref] @current_version = hash[:current_version] @entries = (hash[:entries] || []).map { |item| item ? Rafflesia::CorpuReleaseHistoryEntry.new(item) : nil } @entry_count = hash[:entry_count] @object_store_root = hash[:object_store_root] end |
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend.
19 20 21 |
# File 'lib/rafflesia/datasets/corpu_release_history_data.rb', line 19 def backend @backend end |
#corpus ⇒ Object
Returns the value of attribute corpus.
19 20 21 |
# File 'lib/rafflesia/datasets/corpu_release_history_data.rb', line 19 def corpus @corpus end |
#current_object ⇒ Object
Returns the value of attribute current_object.
19 20 21 |
# File 'lib/rafflesia/datasets/corpu_release_history_data.rb', line 19 def current_object @current_object end |
#current_ref ⇒ Object
Returns the value of attribute current_ref.
19 20 21 |
# File 'lib/rafflesia/datasets/corpu_release_history_data.rb', line 19 def current_ref @current_ref end |
#current_version ⇒ Object
Returns the value of attribute current_version.
19 20 21 |
# File 'lib/rafflesia/datasets/corpu_release_history_data.rb', line 19 def current_version @current_version end |
#entries ⇒ Object
Returns the value of attribute entries.
19 20 21 |
# File 'lib/rafflesia/datasets/corpu_release_history_data.rb', line 19 def entries @entries end |
#entry_count ⇒ Object
Returns the value of attribute entry_count.
19 20 21 |
# File 'lib/rafflesia/datasets/corpu_release_history_data.rb', line 19 def entry_count @entry_count end |
#object_store_root ⇒ Object
Returns the value of attribute object_store_root.
19 20 21 |
# File 'lib/rafflesia/datasets/corpu_release_history_data.rb', line 19 def object_store_root @object_store_root end |