Class: Chemicalml::Model::Product
- Defined in:
- lib/chemicalml/model/product.rb
Instance Attribute Summary collapse
-
#substance ⇒ Object
Returns the value of attribute substance.
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(substance:) ⇒ Product
constructor
A new instance of Product.
- #value_attributes ⇒ Object
Methods inherited from Node
#==, #accept, #hash, short_name
Constructor Details
#initialize(substance:) ⇒ Product
Returns a new instance of Product.
8 9 10 |
# File 'lib/chemicalml/model/product.rb', line 8 def initialize(substance:) @substance = substance end |
Instance Attribute Details
#substance ⇒ Object
Returns the value of attribute substance.
6 7 8 |
# File 'lib/chemicalml/model/product.rb', line 6 def substance @substance end |
Instance Method Details
#children ⇒ Object
12 13 14 |
# File 'lib/chemicalml/model/product.rb', line 12 def children [substance] end |
#value_attributes ⇒ Object
16 17 18 |
# File 'lib/chemicalml/model/product.rb', line 16 def value_attributes { substance: substance } end |