Class: Rafflesia::CorpuReleaseHistoryData

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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

#backendObject

Returns the value of attribute backend.



19
20
21
# File 'lib/rafflesia/datasets/corpu_release_history_data.rb', line 19

def backend
  @backend
end

#corpusObject

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_objectObject

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_refObject

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_versionObject

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

#entriesObject

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_countObject

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_rootObject

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