Class: Rafflesia::DatasetRelationRef

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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

#grainObject

Returns the value of attribute grain.



17
18
19
# File 'lib/rafflesia/foundry/dataset_relation_ref.rb', line 17

def grain
  @grain
end

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/rafflesia/foundry/dataset_relation_ref.rb', line 17

def name
  @name
end

#primary_keyObject

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_countObject

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_hashObject

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_versionObject

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