Class: Chemicalml::Model::ReactionList

Inherits:
Node
  • Object
show all
Defined in:
lib/chemicalml/model/reaction_list.rb

Overview

A reaction cascade: ordered list of Reaction instances where each step's products are the next step's reactants.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#==, #accept, #hash, short_name

Constructor Details

#initialize(reactions: []) ⇒ ReactionList

Returns a new instance of ReactionList.



10
11
12
# File 'lib/chemicalml/model/reaction_list.rb', line 10

def initialize(reactions: [])
  @reactions = reactions
end

Instance Attribute Details

#reactionsObject

Returns the value of attribute reactions.



8
9
10
# File 'lib/chemicalml/model/reaction_list.rb', line 8

def reactions
  @reactions
end

Instance Method Details

#childrenObject



14
15
16
# File 'lib/chemicalml/model/reaction_list.rb', line 14

def children
  reactions
end

#value_attributesObject



18
19
20
# File 'lib/chemicalml/model/reaction_list.rb', line 18

def value_attributes
  { reactions: reactions }
end