Module: Alf::Algebra::Unary
- Included in:
- Autonum, Clip, Coerce, Compact, Defaults, Extend, Group, InferHeading, Project, Quota, Rank, Rename, Restrict, Sort, Summarize, TypeSafe, Ungroup, Unwrap, Wrap
- Defined in:
- lib/alf-algebra/alf/algebra/support/unary.rb
Overview
Specialization of Operator for operators that work on a unary input
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(mod) ⇒ Object
module ClassMethods.
Instance Method Summary collapse
-
#operand ⇒ Object
Simply returns the first operand.
- #with_operand(operand) ⇒ Object
Class Method Details
.included(mod) ⇒ Object
module ClassMethods
18 19 20 21 |
# File 'lib/alf-algebra/alf/algebra/support/unary.rb', line 18 def self.included(mod) super mod.extend(ClassMethods) end |
Instance Method Details
#operand ⇒ Object
Simply returns the first operand
24 25 26 |
# File 'lib/alf-algebra/alf/algebra/support/unary.rb', line 24 def operand operands.first end |
#with_operand(operand) ⇒ Object
28 29 30 |
# File 'lib/alf-algebra/alf/algebra/support/unary.rb', line 28 def with_operand(operand) with_operands(operand) end |