Class: ExaltedMath::Node::Number
- Inherits:
-
ExaltedMath::Node
- Object
- ExaltedMath::Node
- ExaltedMath::Node::Number
- Defined in:
- lib/exalted_math/node/number.rb
Instance Method Summary collapse
- #==(o) ⇒ Object
- #constant? ⇒ Boolean
-
#initialize(value) ⇒ Number
constructor
A new instance of Number.
- #valid? ⇒ Boolean
- #value(context = {}) ⇒ Object
Methods inherited from ExaltedMath::Node
Constructor Details
#initialize(value) ⇒ Number
Returns a new instance of Number.
6 7 8 |
# File 'lib/exalted_math/node/number.rb', line 6 def initialize(value) @value = value end |
Instance Method Details
#==(o) ⇒ Object
18 19 20 21 |
# File 'lib/exalted_math/node/number.rb', line 18 def ==(o) return false unless self.class === o @value == o.value end |
#constant? ⇒ Boolean
10 11 12 |
# File 'lib/exalted_math/node/number.rb', line 10 def constant? true end |
#valid? ⇒ Boolean
23 24 25 |
# File 'lib/exalted_math/node/number.rb', line 23 def valid?(*) true end |
#value(context = {}) ⇒ Object
14 15 16 |
# File 'lib/exalted_math/node/number.rb', line 14 def value(context={}) @value end |