Class: Rafflesia::RelationArtifactData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::RelationArtifactData
- Defined in:
- lib/rafflesia/cache/relation_artifact_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ columns: :columns, content_hash: :content_hash, database: :database, object: :object, object_refs: :object_refs, preview: :preview, relation: :relation, release: :release, row_count: :row_count, schema_ref: :schema_ref }.freeze
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#content_hash ⇒ Object
Returns the value of attribute content_hash.
-
#database ⇒ Object
Returns the value of attribute database.
-
#object ⇒ Object
Returns the value of attribute object.
-
#object_refs ⇒ Object
Returns the value of attribute object_refs.
-
#preview ⇒ Object
Returns the value of attribute preview.
-
#relation ⇒ Object
Returns the value of attribute relation.
-
#release ⇒ Object
Returns the value of attribute release.
-
#row_count ⇒ Object
Returns the value of attribute row_count.
-
#schema_ref ⇒ Object
Returns the value of attribute schema_ref.
Instance Method Summary collapse
-
#initialize(json) ⇒ RelationArtifactData
constructor
A new instance of RelationArtifactData.
Constructor Details
#initialize(json) ⇒ RelationArtifactData
Returns a new instance of RelationArtifactData.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rafflesia/cache/relation_artifact_data.rb', line 33 def initialize(json) super() hash = self.class.normalize(json) @columns = (hash[:columns] || []).map { |item| item ? Rafflesia::TableColumn.new(item) : nil } @content_hash = hash[:content_hash] @database = hash[:database] @object = hash[:object] @object_refs = (hash[:object_refs] || []) @preview = hash[:preview] ? Rafflesia::RelationPreviewData.new(hash[:preview]) : nil @relation = hash[:relation] @release = hash[:release] @row_count = hash[:row_count] @schema_ref = hash[:schema_ref] end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
21 22 23 |
# File 'lib/rafflesia/cache/relation_artifact_data.rb', line 21 def columns @columns end |
#content_hash ⇒ Object
Returns the value of attribute content_hash.
21 22 23 |
# File 'lib/rafflesia/cache/relation_artifact_data.rb', line 21 def content_hash @content_hash end |
#database ⇒ Object
Returns the value of attribute database.
21 22 23 |
# File 'lib/rafflesia/cache/relation_artifact_data.rb', line 21 def database @database end |
#object ⇒ Object
Returns the value of attribute object.
21 22 23 |
# File 'lib/rafflesia/cache/relation_artifact_data.rb', line 21 def object @object end |
#object_refs ⇒ Object
Returns the value of attribute object_refs.
21 22 23 |
# File 'lib/rafflesia/cache/relation_artifact_data.rb', line 21 def object_refs @object_refs end |
#preview ⇒ Object
Returns the value of attribute preview.
21 22 23 |
# File 'lib/rafflesia/cache/relation_artifact_data.rb', line 21 def preview @preview end |
#relation ⇒ Object
Returns the value of attribute relation.
21 22 23 |
# File 'lib/rafflesia/cache/relation_artifact_data.rb', line 21 def relation @relation end |
#release ⇒ Object
Returns the value of attribute release.
21 22 23 |
# File 'lib/rafflesia/cache/relation_artifact_data.rb', line 21 def release @release end |
#row_count ⇒ Object
Returns the value of attribute row_count.
21 22 23 |
# File 'lib/rafflesia/cache/relation_artifact_data.rb', line 21 def row_count @row_count end |
#schema_ref ⇒ Object
Returns the value of attribute schema_ref.
21 22 23 |
# File 'lib/rafflesia/cache/relation_artifact_data.rb', line 21 def schema_ref @schema_ref end |