Class: Rafflesia::CorpuReleaseHistoryEntry

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

Constant Summary collapse

HASH_ATTRS =
{
  audit_object: :audit_object,
  audit_payload: :audit_payload,
  corpus: :corpus,
  current_object: :current_object,
  index: :index,
  operation: :operation,
  previous_ref: :previous_ref,
  published_at: :published_at,
  reason: :reason,
  ref: :ref,
  release_id: :release_id,
  release_object: :release_object,
  schema_version: :schema_version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CorpuReleaseHistoryEntry

Returns a new instance of CorpuReleaseHistoryEntry.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 39

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @audit_object = hash[:audit_object] ? Rafflesia::ObjectRef.new(hash[:audit_object]) : nil
  @audit_payload = hash[:audit_payload] || {}
  @corpus = hash[:corpus]
  @current_object = hash[:current_object]
  @index = hash[:index]
  @operation = hash[:operation]
  @previous_ref = hash[:previous_ref]
  @published_at = hash[:published_at]
  @reason = hash[:reason]
  @ref = hash[:ref]
  @release_id = hash[:release_id]
  @release_object = hash[:release_object]
  @schema_version = hash[:schema_version]
end

Instance Attribute Details

#audit_objectObject

Returns the value of attribute audit_object.



24
25
26
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 24

def audit_object
  @audit_object
end

#audit_payloadObject

Returns the value of attribute audit_payload.



24
25
26
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 24

def audit_payload
  @audit_payload
end

#corpusObject

Returns the value of attribute corpus.



24
25
26
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 24

def corpus
  @corpus
end

#current_objectObject

Returns the value of attribute current_object.



24
25
26
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 24

def current_object
  @current_object
end

#indexObject

Returns the value of attribute index.



24
25
26
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 24

def index
  @index
end

#operationObject

Returns the value of attribute operation.



24
25
26
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 24

def operation
  @operation
end

#previous_refObject

Returns the value of attribute previous_ref.



24
25
26
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 24

def previous_ref
  @previous_ref
end

#published_atObject

Returns the value of attribute published_at.



24
25
26
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 24

def published_at
  @published_at
end

#reasonObject

Returns the value of attribute reason.



24
25
26
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 24

def reason
  @reason
end

#refObject

Returns the value of attribute ref.



24
25
26
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 24

def ref
  @ref
end

#release_idObject

Returns the value of attribute release_id.



24
25
26
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 24

def release_id
  @release_id
end

#release_objectObject

Returns the value of attribute release_object.



24
25
26
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 24

def release_object
  @release_object
end

#schema_versionObject

Returns the value of attribute schema_version.



24
25
26
# File 'lib/rafflesia/datasets/corpu_release_history_entry.rb', line 24

def schema_version
  @schema_version
end