Class: Keisan::AST::Times
- Inherits:
-
ArithmeticOperator
- Object
- Node
- Parent
- Operator
- ArithmeticOperator
- Keisan::AST::Times
- Defined in:
- lib/keisan/ast/times.rb
Instance Attribute Summary
Attributes inherited from Parent
Class Method Summary collapse
Instance Method Summary collapse
- #arity ⇒ Object
- #blank_value ⇒ Object
-
#initialize(children = [], parsing_operators = []) ⇒ Times
constructor
A new instance of Times.
- #symbol ⇒ Object
Methods inherited from ArithmeticOperator
Methods inherited from Operator
Methods inherited from Node
Constructor Details
#initialize(children = [], parsing_operators = []) ⇒ Times
4 5 6 7 |
# File 'lib/keisan/ast/times.rb', line 4 def initialize(children = [], parsing_operators = []) super convert_divide_to_inverse! end |
Class Method Details
.priority ⇒ Object
9 10 11 |
# File 'lib/keisan/ast/times.rb', line 9 def self.priority 20 end |
Instance Method Details
#arity ⇒ Object
13 14 15 |
# File 'lib/keisan/ast/times.rb', line 13 def arity 2..Float::INFINITY end |
#blank_value ⇒ Object
21 22 23 |
# File 'lib/keisan/ast/times.rb', line 21 def blank_value 1 end |
#symbol ⇒ Object
17 18 19 |
# File 'lib/keisan/ast/times.rb', line 17 def symbol :* end |