Class: Bio::UniChem::Source

Inherits:
Object
  • Object
show all
Defined in:
lib/bio-unichem/model.rb

Overview

Bio::UniChem::Source

hash = {‘src_id’ => ‘1, ’short_name’ => … } chembl = Bio::UniChem::Source.new(hash) chembl.src_id #=> “1” chembl.short_name #=> “chembl” chembl.full_name #=> “ChEMBL”

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = nil) ⇒ Source

Bio::UniChem::Source.new(hash)



24
25
26
27
28
29
30
# File 'lib/bio-unichem/model.rb', line 24

def initialize(hash = nil)
  @src_id      = hash["src_id"]
  @short_name  = hash["short_name"]
  @full_name   = hash["full_name"]
  @description = hash["description"]
  @process_of_data_acquisition = hash["process_of_data_acquisition"]
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



19
20
21
# File 'lib/bio-unichem/model.rb', line 19

def description
  @description
end

#full_nameObject (readonly)

Returns the value of attribute full_name.



18
19
20
# File 'lib/bio-unichem/model.rb', line 18

def full_name
  @full_name
end

#process_of_data_acquisitionObject (readonly)

Returns the value of attribute process_of_data_acquisition.



20
21
22
# File 'lib/bio-unichem/model.rb', line 20

def process_of_data_acquisition
  @process_of_data_acquisition
end

#short_nameObject (readonly)

Returns the value of attribute short_name.



17
18
19
# File 'lib/bio-unichem/model.rb', line 17

def short_name
  @short_name
end

#src_idObject (readonly)

Returns the value of attribute src_id.



16
17
18
# File 'lib/bio-unichem/model.rb', line 16

def src_id
  @src_id
end