Class: Rafflesia::OntologyDiffData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::OntologyDiffData
- Defined in:
- lib/rafflesia/ontology/ontology_diff_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ added_count: :added_count, affected_relations: :affected_relations, affected_vocabulary_kinds: :affected_vocabulary_kinds, available_digests: :available_digests, change_count: :change_count, changes: :changes, from_digest: :from_digest, from_source: :from_source, id: :id, is_changed: :is_changed, modified_count: :modified_count, object: :object, removed_count: :removed_count, to_digest: :to_digest, to_source: :to_source }.freeze
Instance Attribute Summary collapse
-
#added_count ⇒ Object
Returns the value of attribute added_count.
-
#affected_relations ⇒ Object
Returns the value of attribute affected_relations.
-
#affected_vocabulary_kinds ⇒ Object
Returns the value of attribute affected_vocabulary_kinds.
-
#available_digests ⇒ Object
Returns the value of attribute available_digests.
-
#change_count ⇒ Object
Returns the value of attribute change_count.
-
#changes ⇒ Object
Returns the value of attribute changes.
-
#from_digest ⇒ Object
Returns the value of attribute from_digest.
-
#from_source ⇒ Object
Returns the value of attribute from_source.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_changed ⇒ Object
Returns the value of attribute is_changed.
-
#modified_count ⇒ Object
Returns the value of attribute modified_count.
-
#object ⇒ Object
Returns the value of attribute object.
-
#removed_count ⇒ Object
Returns the value of attribute removed_count.
-
#to_digest ⇒ Object
Returns the value of attribute to_digest.
-
#to_source ⇒ Object
Returns the value of attribute to_source.
Instance Method Summary collapse
-
#initialize(json) ⇒ OntologyDiffData
constructor
A new instance of OntologyDiffData.
Constructor Details
#initialize(json) ⇒ OntologyDiffData
Returns a new instance of OntologyDiffData.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 43 def initialize(json) super() hash = self.class.normalize(json) @added_count = hash[:added_count] @affected_relations = (hash[:affected_relations] || []) @affected_vocabulary_kinds = (hash[:affected_vocabulary_kinds] || []) @available_digests = (hash[:available_digests] || []) @change_count = hash[:change_count] @changes = (hash[:changes] || []).map { |item| item ? Rafflesia::OntologyDiffChange.new(item) : nil } @from_digest = hash[:from_digest] @from_source = hash[:from_source] @id = hash[:id] @is_changed = hash[:is_changed] @modified_count = hash[:modified_count] @object = hash[:object] @removed_count = hash[:removed_count] @to_digest = hash[:to_digest] @to_source = hash[:to_source] end |
Instance Attribute Details
#added_count ⇒ Object
Returns the value of attribute added_count.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def added_count @added_count end |
#affected_relations ⇒ Object
Returns the value of attribute affected_relations.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def affected_relations @affected_relations end |
#affected_vocabulary_kinds ⇒ Object
Returns the value of attribute affected_vocabulary_kinds.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def affected_vocabulary_kinds @affected_vocabulary_kinds end |
#available_digests ⇒ Object
Returns the value of attribute available_digests.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def available_digests @available_digests end |
#change_count ⇒ Object
Returns the value of attribute change_count.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def change_count @change_count end |
#changes ⇒ Object
Returns the value of attribute changes.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def changes @changes end |
#from_digest ⇒ Object
Returns the value of attribute from_digest.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def from_digest @from_digest end |
#from_source ⇒ Object
Returns the value of attribute from_source.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def from_source @from_source end |
#id ⇒ Object
Returns the value of attribute id.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def id @id end |
#is_changed ⇒ Object
Returns the value of attribute is_changed.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def is_changed @is_changed end |
#modified_count ⇒ Object
Returns the value of attribute modified_count.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def modified_count @modified_count end |
#object ⇒ Object
Returns the value of attribute object.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def object @object end |
#removed_count ⇒ Object
Returns the value of attribute removed_count.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def removed_count @removed_count end |
#to_digest ⇒ Object
Returns the value of attribute to_digest.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def to_digest @to_digest end |
#to_source ⇒ Object
Returns the value of attribute to_source.
26 27 28 |
# File 'lib/rafflesia/ontology/ontology_diff_data.rb', line 26 def to_source @to_source end |