Class: Rafflesia::DatasetRelationRef
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DatasetRelationRef
- Defined in:
- lib/rafflesia/foundry/dataset_relation_ref.rb
Constant Summary collapse
- HASH_ATTRS =
{ grain: :grain, name: :name, primary_key: :primary_key, row_count: :row_count, schema_hash: :schema_hash, schema_version: :schema_version }.freeze
Instance Attribute Summary collapse
-
#grain ⇒ Object
Returns the value of attribute grain.
-
#name ⇒ Object
Returns the value of attribute name.
-
#primary_key ⇒ Object
Returns the value of attribute primary_key.
-
#row_count ⇒ Object
Returns the value of attribute row_count.
-
#schema_hash ⇒ Object
Returns the value of attribute schema_hash.
-
#schema_version ⇒ Object
Returns the value of attribute schema_version.
Instance Method Summary collapse
-
#initialize(json) ⇒ DatasetRelationRef
constructor
A new instance of DatasetRelationRef.
Constructor Details
#initialize(json) ⇒ DatasetRelationRef
Returns a new instance of DatasetRelationRef.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rafflesia/foundry/dataset_relation_ref.rb', line 25 def initialize(json) super() hash = self.class.normalize(json) @grain = hash[:grain] @name = hash[:name] @primary_key = (hash[:primary_key] || []) @row_count = hash[:row_count] @schema_hash = hash[:schema_hash] @schema_version = hash[:schema_version] end |
Instance Attribute Details
#grain ⇒ Object
Returns the value of attribute grain.
17 18 19 |
# File 'lib/rafflesia/foundry/dataset_relation_ref.rb', line 17 def grain @grain end |
#name ⇒ Object
Returns the value of attribute name.
17 18 19 |
# File 'lib/rafflesia/foundry/dataset_relation_ref.rb', line 17 def name @name end |
#primary_key ⇒ Object
Returns the value of attribute primary_key.
17 18 19 |
# File 'lib/rafflesia/foundry/dataset_relation_ref.rb', line 17 def primary_key @primary_key end |
#row_count ⇒ Object
Returns the value of attribute row_count.
17 18 19 |
# File 'lib/rafflesia/foundry/dataset_relation_ref.rb', line 17 def row_count @row_count end |
#schema_hash ⇒ Object
Returns the value of attribute schema_hash.
17 18 19 |
# File 'lib/rafflesia/foundry/dataset_relation_ref.rb', line 17 def schema_hash @schema_hash end |
#schema_version ⇒ Object
Returns the value of attribute schema_version.
17 18 19 |
# File 'lib/rafflesia/foundry/dataset_relation_ref.rb', line 17 def schema_version @schema_version end |