Class: Rafflesia::DatabaseJoinListData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/database_joins/database_join_list_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  data: :data,
  evidence_requirement: :evidence_requirement,
  from_database: :from_database,
  from_queryable_relation_count: :from_queryable_relation_count,
  from_release: :from_release,
  has_more: :has_more,
  is_release_backed: :is_release_backed,
  object: :object,
  ontology_digest: :ontology_digest,
  ontology_version: :ontology_version,
  safety: :safety,
  safety_basis: :safety_basis,
  to_database: :to_database,
  to_queryable_relation_count: :to_queryable_relation_count,
  to_release: :to_release,
  url: :url
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatabaseJoinListData

Returns a new instance of DatabaseJoinListData.



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 45

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @data = (hash[:data] || []).map { |item| item ? Rafflesia::OntologyJoinStep.new(item) : nil }
  @evidence_requirement = hash[:evidence_requirement]
  @from_database = hash[:from_database]
  @from_queryable_relation_count = hash[:from_queryable_relation_count]
  @from_release = hash[:from_release]
  @has_more = hash[:has_more]
  @is_release_backed = hash[:is_release_backed]
  @object = hash[:object]
  @ontology_digest = hash[:ontology_digest]
  @ontology_version = hash[:ontology_version]
  @safety = hash[:safety]
  @safety_basis = hash[:safety_basis]
  @to_database = hash[:to_database]
  @to_queryable_relation_count = hash[:to_queryable_relation_count]
  @to_release = hash[:to_release]
  @url = hash[:url]
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def data
  @data
end

#evidence_requirementObject

Returns the value of attribute evidence_requirement.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def evidence_requirement
  @evidence_requirement
end

#from_databaseObject

Returns the value of attribute from_database.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def from_database
  @from_database
end

#from_queryable_relation_countObject

Returns the value of attribute from_queryable_relation_count.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def from_queryable_relation_count
  @from_queryable_relation_count
end

#from_releaseObject

Returns the value of attribute from_release.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def from_release
  @from_release
end

#has_moreObject

Returns the value of attribute has_more.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def has_more
  @has_more
end

#is_release_backedObject

Returns the value of attribute is_release_backed.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def is_release_backed
  @is_release_backed
end

#objectObject

Returns the value of attribute object.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def object
  @object
end

#ontology_digestObject

Returns the value of attribute ontology_digest.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def ontology_digest
  @ontology_digest
end

#ontology_versionObject

Returns the value of attribute ontology_version.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def ontology_version
  @ontology_version
end

#safetyObject

Returns the value of attribute safety.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def safety
  @safety
end

#safety_basisObject

Returns the value of attribute safety_basis.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def safety_basis
  @safety_basis
end

#to_databaseObject

Returns the value of attribute to_database.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def to_database
  @to_database
end

#to_queryable_relation_countObject

Returns the value of attribute to_queryable_relation_count.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def to_queryable_relation_count
  @to_queryable_relation_count
end

#to_releaseObject

Returns the value of attribute to_release.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def to_release
  @to_release
end

#urlObject

Returns the value of attribute url.



27
28
29
# File 'lib/rafflesia/database_joins/database_join_list_data.rb', line 27

def url
  @url
end