Class: Rafflesia::CorpuReleasePublishCurrentData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/datasets/corpu_release_publish_current_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  audit_object: :audit_object,
  backend: :backend,
  corpus: :corpus,
  current_object: :current_object,
  current_pointer: :current_pointer,
  current_version: :current_version,
  family_defaults: :family_defaults,
  gates: :gates,
  object_store_root: :object_store_root,
  ok: :ok,
  previous_ref: :previous_ref,
  published_at: :published_at,
  ref: :ref,
  release: :release,
  release_id: :release_id,
  smoke_search: :smoke_search
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CorpuReleasePublishCurrentData

Returns a new instance of CorpuReleasePublishCurrentData.



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 45

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @audit_object = hash[:audit_object] ? Rafflesia::ObjectRef.new(hash[:audit_object]) : nil
  @backend = hash[:backend]
  @corpus = hash[:corpus]
  @current_object = hash[:current_object]
  @current_pointer = hash[:current_pointer] || {}
  @current_version = hash[:current_version]
  @family_defaults = hash[:family_defaults] || {}
  @gates = (hash[:gates] || []).map { |item| item ? Rafflesia::CorpuReleasePublishGate.new(item) : nil }
  @object_store_root = hash[:object_store_root]
  @ok = hash[:ok]
  @previous_ref = hash[:previous_ref]
  @published_at = hash[:published_at]
  @ref = hash[:ref]
  @release = hash[:release] ? Rafflesia::CorpuReleaseRecord.new(hash[:release]) : nil
  @release_id = hash[:release_id]
  @smoke_search = hash[:smoke_search] ? Rafflesia::CorpuReleaseSearchData.new(hash[:smoke_search]) : nil
end

Instance Attribute Details

#audit_objectObject

Returns the value of attribute audit_object.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def audit_object
  @audit_object
end

#backendObject

Returns the value of attribute backend.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def backend
  @backend
end

#corpusObject

Returns the value of attribute corpus.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def corpus
  @corpus
end

#current_objectObject

Returns the value of attribute current_object.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def current_object
  @current_object
end

#current_pointerObject

Returns the value of attribute current_pointer.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def current_pointer
  @current_pointer
end

#current_versionObject

Returns the value of attribute current_version.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def current_version
  @current_version
end

#family_defaultsObject

Returns the value of attribute family_defaults.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def family_defaults
  @family_defaults
end

#gatesObject

Returns the value of attribute gates.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def gates
  @gates
end

#object_store_rootObject

Returns the value of attribute object_store_root.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def object_store_root
  @object_store_root
end

#okObject

Returns the value of attribute ok.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def ok
  @ok
end

#previous_refObject

Returns the value of attribute previous_ref.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def previous_ref
  @previous_ref
end

#published_atObject

Returns the value of attribute published_at.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def published_at
  @published_at
end

#refObject

Returns the value of attribute ref.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def ref
  @ref
end

#releaseObject

Returns the value of attribute release.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def release
  @release
end

#release_idObject

Returns the value of attribute release_id.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def release_id
  @release_id
end

#smoke_searchObject

Returns the value of attribute smoke_search.



27
28
29
# File 'lib/rafflesia/datasets/corpu_release_publish_current_data.rb', line 27

def smoke_search
  @smoke_search
end