Class: Rafflesia::OntologyVocabularyListData

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

Constant Summary collapse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OntologyVocabularyListData

Returns a new instance of OntologyVocabularyListData.



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rafflesia/ontology/ontology_vocabulary_list_data.rb', line 29

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

Instance Attribute Details

#dataObject

Returns the value of attribute data.



19
20
21
# File 'lib/rafflesia/ontology/ontology_vocabulary_list_data.rb', line 19

def data
  @data
end

#has_moreObject

Returns the value of attribute has_more.



19
20
21
# File 'lib/rafflesia/ontology/ontology_vocabulary_list_data.rb', line 19

def has_more
  @has_more
end

#kindObject

Returns the value of attribute kind.



19
20
21
# File 'lib/rafflesia/ontology/ontology_vocabulary_list_data.rb', line 19

def kind
  @kind
end

#next_cursorObject

Returns the value of attribute next_cursor.



19
20
21
# File 'lib/rafflesia/ontology/ontology_vocabulary_list_data.rb', line 19

def next_cursor
  @next_cursor
end

#objectObject

Returns the value of attribute object.



19
20
21
# File 'lib/rafflesia/ontology/ontology_vocabulary_list_data.rb', line 19

def object
  @object
end

#ontology_digestObject

Returns the value of attribute ontology_digest.



19
20
21
# File 'lib/rafflesia/ontology/ontology_vocabulary_list_data.rb', line 19

def ontology_digest
  @ontology_digest
end

#ontology_versionObject

Returns the value of attribute ontology_version.



19
20
21
# File 'lib/rafflesia/ontology/ontology_vocabulary_list_data.rb', line 19

def ontology_version
  @ontology_version
end

#urlObject

Returns the value of attribute url.



19
20
21
# File 'lib/rafflesia/ontology/ontology_vocabulary_list_data.rb', line 19

def url
  @url
end