Class: ChemSpider::SpectrumInfo
- Inherits:
-
Object
- Object
- ChemSpider::SpectrumInfo
- Defined in:
- lib/chem_spider/services/spectra.rb
Constant Summary collapse
- ATTRIBUTES =
{ :spc_id => { :selector => 'spc_id', :datatype => Integer, :first_child => true, }, :spc_type => { :selector => 'spc_type', :datatype => String, :first_child => true, }, :csid => { :selector => 'csid', :datatype => Integer, :first_child => true, }, :file_name => { :selector => 'file_name', :datatype => String, :first_child => true, }, :comments => { :selector => 'comments', :datatype => String, :first_child => true, }, :original_url => { :selector => 'original_url', :datatype => URI, :first_child => true, }, :submitted_date => { :selector => 'submitted_date', :datatype => DateTime, :first_child => true, }, }.freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ SpectrumInfo
constructor
A new instance of SpectrumInfo.
Constructor Details
#initialize(attributes = {}) ⇒ SpectrumInfo
Returns a new instance of SpectrumInfo.
49 50 51 52 53 |
# File 'lib/chem_spider/services/spectra.rb', line 49 def initialize(attributes = {}) ATTRIBUTES.keys.each do |attr_name| instance_variable_set(:"@#{attr_name}", attributes[attr_name]) end end |
Class Method Details
.__attributes__ ⇒ Object
42 43 44 |
# File 'lib/chem_spider/services/spectra.rb', line 42 def __attributes__ ATTRIBUTES end |