Class: CommonChemistry::ExperimentalProperty
- Inherits:
-
Object
- Object
- CommonChemistry::ExperimentalProperty
- Defined in:
- lib/commonchemistry.rb
Overview
Represents an experimental property of a substance
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#property ⇒ Object
readonly
Returns the value of attribute property.
-
#source_number ⇒ Object
readonly
Returns the value of attribute source_number.
Instance Method Summary collapse
-
#initialize(data) ⇒ ExperimentalProperty
constructor
A new instance of ExperimentalProperty.
Constructor Details
#initialize(data) ⇒ ExperimentalProperty
Returns a new instance of ExperimentalProperty.
161 162 163 164 165 |
# File 'lib/commonchemistry.rb', line 161 def initialize(data) @name = data['name'] @property = data['property'] @source_number = data['sourceNumber'] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
159 160 161 |
# File 'lib/commonchemistry.rb', line 159 def name @name end |
#property ⇒ Object (readonly)
Returns the value of attribute property.
159 160 161 |
# File 'lib/commonchemistry.rb', line 159 def property @property end |
#source_number ⇒ Object (readonly)
Returns the value of attribute source_number.
159 160 161 |
# File 'lib/commonchemistry.rb', line 159 def source_number @source_number end |