module Axiom::Function::Unary::Callable
Mixin for adding call
to unary function classes
Public Instance Methods
call(value)
click to toggle source
Return the response from the unary operation called on the value
@example
callable.call(value) # => any object
@param [Object] value
@return [Object]
@api public
# File lib/axiom/function/unary.rb, line 38 def call(value) value.public_send(operation) end
included(descendant)
click to toggle source
Hook called when module is included
@param [Module] descendant
the module or class including Callable
@return [self]
@api private
Calls superclass method
# File lib/axiom/function/unary.rb, line 22 def included(descendant) super descendant.extend(Callable) self end