Class: Ilm::Chemical::Reactors::Reactor
- Inherits:
-
Object
- Object
- Ilm::Chemical::Reactors::Reactor
- Defined in:
- lib/ilm/chemical/reactors/reactor.rb
Overview
This is the base class for the diff kinds of reactors
Direct Known Subclasses
Instance Attribute Summary collapse
-
#input ⇒ Object
Returns the value of attribute input.
-
#output ⇒ Object
Returns the value of attribute output.
-
#reaction ⇒ Object
Returns the value of attribute reaction.
-
#system ⇒ Object
Returns the value of attribute system.
-
#volume ⇒ Object
Returns the value of attribute volume.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Reactor
constructor
ATTRS = [:system, :volume, :input, :output, :rate_equation].
Constructor Details
#initialize(args = {}) ⇒ Reactor
ATTRS = [:system, :volume, :input, :output, :rate_equation]
10 11 12 13 14 15 16 |
# File 'lib/ilm/chemical/reactors/reactor.rb', line 10 def initialize(args = {}) self.system = args[:system] self.volume = args[:volume] if args[:volume] self.input = args[:input] if args[:input] self.output = args[:output] if args[:output] self.reaction = args[:reaction] if args[:reaction] end |
Instance Attribute Details
#input ⇒ Object
Returns the value of attribute input.
6 7 8 |
# File 'lib/ilm/chemical/reactors/reactor.rb', line 6 def input @input end |
#output ⇒ Object
Returns the value of attribute output.
6 7 8 |
# File 'lib/ilm/chemical/reactors/reactor.rb', line 6 def output @output end |
#reaction ⇒ Object
Returns the value of attribute reaction.
6 7 8 |
# File 'lib/ilm/chemical/reactors/reactor.rb', line 6 def reaction @reaction end |
#system ⇒ Object
Returns the value of attribute system.
6 7 8 |
# File 'lib/ilm/chemical/reactors/reactor.rb', line 6 def system @system end |
#volume ⇒ Object
Returns the value of attribute volume.
6 7 8 |
# File 'lib/ilm/chemical/reactors/reactor.rb', line 6 def volume @volume end |