Class: Constant
- Inherits:
-
Object
- Object
- Constant
- Defined in:
- lib/hypatia/formula.rb
Instance Method Summary collapse
-
#initialize(value) ⇒ Constant
constructor
A new instance of Constant.
- #value ⇒ Object
Constructor Details
#initialize(value) ⇒ Constant
26 27 28 |
# File 'lib/hypatia/formula.rb', line 26 def initialize(value) @value = value end |
Instance Method Details
#value ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/hypatia/formula.rb', line 30 def value if @value.is_a?(Operation) @value.result else @value end end |