Class: CommonChemistry::ExperimentalProperty

Inherits:
Object
  • Object
show all
Defined in:
lib/commonchemistry.rb

Overview

Represents an experimental property of a substance

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



159
160
161
# File 'lib/commonchemistry.rb', line 159

def name
  @name
end

#propertyObject (readonly)

Returns the value of attribute property.



159
160
161
# File 'lib/commonchemistry.rb', line 159

def property
  @property
end

#source_numberObject (readonly)

Returns the value of attribute source_number.



159
160
161
# File 'lib/commonchemistry.rb', line 159

def source_number
  @source_number
end