Module: Axiom::Function::Numeric::Binary
- Includes:
- Binary
- Included in:
- Addition, Division, Exponentiation, Modulo, Multiplication, Subtraction
- Defined in:
- lib/axiom/function/numeric/binary.rb
Overview
A mixin for numeric Binary functions
Instance Attribute Summary
Attributes included from Operation::Binary
Instance Method Summary collapse
-
#type ⇒ Class<Attribute::Numeric>
Return the type returned from #call.
Methods included from Binary
Methods included from Operation::Binary
Instance Method Details
#type ⇒ Class<Attribute::Numeric>
Return the type returned from #call
16 17 18 19 20 21 |
# File 'lib/axiom/function/numeric/binary.rb', line 16 def type util = Attribute left_type = util.infer_type(left) right_type = util.infer_type(right) left_type.equal?(right_type) ? left_type : Attribute::Numeric end |