Class: ChemScanner::Interpreter::ReactionStep
- Inherits:
-
Object
- Object
- ChemScanner::Interpreter::ReactionStep
- Defined in:
- lib/chem_scanner/interpreter/element/reaction_step.rb
Overview
Reaction Step
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#number ⇒ Object
Returns the value of attribute number.
-
#reagents ⇒ Object
Returns the value of attribute reagents.
-
#temperature ⇒ Object
Returns the value of attribute temperature.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize ⇒ ReactionStep
constructor
A new instance of ReactionStep.
- #inspect ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ ReactionStep
Returns a new instance of ReactionStep.
9 10 11 12 13 14 15 16 |
# File 'lib/chem_scanner/interpreter/element/reaction_step.rb', line 9 def initialize @number = 0 @description = "" @time = "" @temperature = "" @reagents = [] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
7 8 9 |
# File 'lib/chem_scanner/interpreter/element/reaction_step.rb', line 7 def description @description end |
#number ⇒ Object
Returns the value of attribute number.
7 8 9 |
# File 'lib/chem_scanner/interpreter/element/reaction_step.rb', line 7 def number @number end |
#reagents ⇒ Object
Returns the value of attribute reagents.
7 8 9 |
# File 'lib/chem_scanner/interpreter/element/reaction_step.rb', line 7 def reagents @reagents end |
#temperature ⇒ Object
Returns the value of attribute temperature.
7 8 9 |
# File 'lib/chem_scanner/interpreter/element/reaction_step.rb', line 7 def temperature @temperature end |
#time ⇒ Object
Returns the value of attribute time.
7 8 9 |
# File 'lib/chem_scanner/interpreter/element/reaction_step.rb', line 7 def time @time end |
Instance Method Details
#inspect ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/chem_scanner/interpreter/element/reaction_step.rb', line 18 def inspect ( "#<ReactionStep: description=#{@description}, " + "number=#{@number}, " + "time=#{@time}, " + "temperature=#{@temperature}, " + "reagents=#{@reagents}" ) end |
#to_hash ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/chem_scanner/interpreter/element/reaction_step.rb', line 28 def to_hash { number: @number, description: @description, time: @time, temperature: @temperature, reagents: @reagents, } end |