Class: Axiom::Function::Numeric::UnaryPlus

Inherits:
Axiom::Function::Numeric show all
Includes:
Unary
Defined in:
lib/axiom/function/numeric/unary_plus.rb

Overview

A class representing a unary plus function

Defined Under Namespace

Modules: Methods

Instance Attribute Summary

Attributes included from Operation::Unary

#operand

Class Method Summary collapse

Methods included from Unary

#call, #rename, #type

Methods included from Unary::Callable

#call, #included

Methods included from Operation::Unary

#initialize

Methods inherited from Axiom::Function::Numeric

type

Methods inherited from Axiom::Function

extract_value, rename_attributes, #type

Methods included from Visitable

#accept

Class Method Details

.inverseClass<UnaryMinus>

Return the inverse function class

Examples:

UnaryPlus.inverse  # => UnaryMinus

Returns:



31
32
33
# File 'lib/axiom/function/numeric/unary_plus.rb', line 31

def self.inverse
  UnaryMinus
end

.operationSymbol

Return the unary plus operation

Examples:

UnaryPlus.operation  # => :+@

Returns:

  • (Symbol)


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

def self.operation
  :+@
end