Class: PubChemAPI::GeneSummary

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ GeneSummary

Returns a new instance of GeneSummary.



77
78
79
80
81
82
83
84
85
# File 'lib/pubchem_api.rb', line 77

def initialize(data)
  super(data)
  gene = data['InformationList']['Information'].first
  @gene_id = gene['GeneID']
  @symbol = gene['Symbol']
  @name = gene['Name']
  @taxonomy_id = gene['TaxID']
  @description = gene['Description']
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



75
76
77
# File 'lib/pubchem_api.rb', line 75

def description
  @description
end

#gene_idObject (readonly)

Returns the value of attribute gene_id.



75
76
77
# File 'lib/pubchem_api.rb', line 75

def gene_id
  @gene_id
end

#nameObject (readonly)

Returns the value of attribute name.



75
76
77
# File 'lib/pubchem_api.rb', line 75

def name
  @name
end

#symbolObject (readonly)

Returns the value of attribute symbol.



75
76
77
# File 'lib/pubchem_api.rb', line 75

def symbol
  @symbol
end

#taxonomy_idObject (readonly)

Returns the value of attribute taxonomy_id.



75
76
77
# File 'lib/pubchem_api.rb', line 75

def taxonomy_id
  @taxonomy_id
end