Module: Axiom::Function::Numeric::Unary

Includes:
Unary
Included in:
Absolute, SquareRoot, UnaryMinus, UnaryPlus
Defined in:
lib/axiom/function/numeric/unary.rb

Overview

A mixin for numeric Unary functions

Instance Attribute Summary

Attributes included from Operation::Unary

#operand

Instance Method Summary collapse

Methods included from Unary

#call, #rename

Methods included from Unary::Callable

#call, #included

Methods included from Operation::Unary

#initialize

Instance Method Details

#typeClass<Attribute::Numeric>

Return the type returned from #call

Examples:

unary.type  # => Attribute::Numeric

Returns:



19
20
21
# File 'lib/axiom/function/numeric/unary.rb', line 19

def type
  Attribute.infer_type(operand)
end