Class: PubChemAPI::PathwaySummary

Inherits:
APIResponse show all
Defined in:
lib/pubchem_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ PathwaySummary

Returns a new instance of PathwaySummary.



105
106
107
108
109
110
111
112
113
114
# File 'lib/pubchem_api.rb', line 105

def initialize(data)
  super(data)
  pathway = data['Pathway'].first
  @pathway_accession = pathway['PathwayId']
  @source_name = pathway['SourceName']
  @name = pathway['Name']
  @category = pathway['Category']
  @description = pathway['Description']
  @taxonomy_id = pathway['TaxId']
end

Instance Attribute Details

#categoryObject (readonly)

Returns the value of attribute category.



103
104
105
# File 'lib/pubchem_api.rb', line 103

def category
  @category
end

#descriptionObject (readonly)

Returns the value of attribute description.



103
104
105
# File 'lib/pubchem_api.rb', line 103

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



103
104
105
# File 'lib/pubchem_api.rb', line 103

def name
  @name
end

#pathway_accessionObject (readonly)

Returns the value of attribute pathway_accession.



103
104
105
# File 'lib/pubchem_api.rb', line 103

def pathway_accession
  @pathway_accession
end

#source_nameObject (readonly)

Returns the value of attribute source_name.



103
104
105
# File 'lib/pubchem_api.rb', line 103

def source_name
  @source_name
end

#taxonomy_idObject (readonly)

Returns the value of attribute taxonomy_id.



103
104
105
# File 'lib/pubchem_api.rb', line 103

def taxonomy_id
  @taxonomy_id
end