Class: Rafflesia::DatasetOntologyBindingListData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/ontology/dataset_ontology_binding_list_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  data: :data,
  has_more: :has_more,
  object: :object,
  ontology_digest: :ontology_digest,
  ontology_version: :ontology_version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetOntologyBindingListData

Returns a new instance of DatasetOntologyBindingListData.



23
24
25
26
27
28
29
30
31
# File 'lib/rafflesia/ontology/dataset_ontology_binding_list_data.rb', line 23

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @data = (hash[:data] || []).map { |item| item ? Rafflesia::DatasetOntologyBinding.new(item) : nil }
  @has_more = hash[:has_more]
  @object = hash[:object]
  @ontology_digest = hash[:ontology_digest]
  @ontology_version = hash[:ontology_version]
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



16
17
18
# File 'lib/rafflesia/ontology/dataset_ontology_binding_list_data.rb', line 16

def data
  @data
end

#has_moreObject

Returns the value of attribute has_more.



16
17
18
# File 'lib/rafflesia/ontology/dataset_ontology_binding_list_data.rb', line 16

def has_more
  @has_more
end

#objectObject

Returns the value of attribute object.



16
17
18
# File 'lib/rafflesia/ontology/dataset_ontology_binding_list_data.rb', line 16

def object
  @object
end

#ontology_digestObject

Returns the value of attribute ontology_digest.



16
17
18
# File 'lib/rafflesia/ontology/dataset_ontology_binding_list_data.rb', line 16

def ontology_digest
  @ontology_digest
end

#ontology_versionObject

Returns the value of attribute ontology_version.



16
17
18
# File 'lib/rafflesia/ontology/dataset_ontology_binding_list_data.rb', line 16

def ontology_version
  @ontology_version
end