Class: Bio::UniChem::Source
- Inherits:
-
Object
- Object
- Bio::UniChem::Source
- 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
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
-
#process_of_data_acquisition ⇒ Object
readonly
Returns the value of attribute process_of_data_acquisition.
-
#short_name ⇒ Object
readonly
Returns the value of attribute short_name.
-
#src_id ⇒ Object
readonly
Returns the value of attribute src_id.
Instance Method Summary collapse
-
#initialize(hash = nil) ⇒ Source
constructor
Bio::UniChem::Source.new(hash).
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
#description ⇒ Object (readonly)
Returns the value of attribute description.
19 20 21 |
# File 'lib/bio-unichem/model.rb', line 19 def description @description end |
#full_name ⇒ Object (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_acquisition ⇒ Object (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_name ⇒ Object (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_id ⇒ Object (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 |