Class: Axiom::Function
- Inherits:
 - 
      Object
      
        
- Object
 - Axiom::Function
 
 
- Includes:
 - AbstractType, Adamantium, Visitable
 
- Defined in:
 - lib/axiom/function.rb,
lib/axiom/function/unary.rb,
lib/axiom/function/binary.rb,
lib/axiom/function/numeric.rb,
lib/axiom/function/predicate.rb,
lib/axiom/function/comparable.rb,
lib/axiom/function/connective.rb,
lib/axiom/function/proposition.rb,
lib/axiom/function/numeric/unary.rb,
lib/axiom/function/string/length.rb,
lib/axiom/function/numeric/binary.rb,
lib/axiom/function/numeric/modulo.rb,
lib/axiom/function/predicate/match.rb,
lib/axiom/function/numeric/absolute.rb,
lib/axiom/function/numeric/addition.rb,
lib/axiom/function/numeric/division.rb,
lib/axiom/function/numeric/unary_plus.rb,
lib/axiom/function/predicate/equality.rb,
lib/axiom/function/predicate/no_match.rb,
lib/axiom/function/connective/negation.rb,
lib/axiom/function/numeric/square_root.rb,
lib/axiom/function/numeric/subtraction.rb,
lib/axiom/function/numeric/unary_minus.rb,
lib/axiom/function/predicate/exclusion.rb,
lib/axiom/function/predicate/inclusion.rb,
lib/axiom/function/predicate/less_than.rb,
lib/axiom/function/predicate/enumerable.rb,
lib/axiom/function/predicate/inequality.rb,
lib/axiom/function/proposition/tautology.rb,
lib/axiom/function/connective/conjunction.rb,
lib/axiom/function/connective/disjunction.rb,
lib/axiom/function/numeric/exponentiation.rb,
lib/axiom/function/numeric/multiplication.rb,
lib/axiom/function/predicate/greater_than.rb,
lib/axiom/function/proposition/contradiction.rb,
lib/axiom/function/predicate/less_than_or_equal_to.rb,
lib/axiom/function/predicate/greater_than_or_equal_to.rb 
Overview
Abstract base class for logical functions
Direct Known Subclasses
Defined Under Namespace
Modules: Binary, Comparable, String, Unary Classes: Connective, Numeric, Predicate, Proposition
Class Method Summary collapse
- 
  
    
      .extract_value(operand, tuple)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  private
  
    
Extract the value from the operand or tuple.
 - 
  
    
      .rename_attributes(operand, aliases)  ⇒ Function 
    
    
  
  
  
  
  
  
  
  private
  
    
Rename the attribute(s) inside the function.
 
Methods included from Visitable
Class Method Details
.extract_value(operand, tuple) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Extract the value from the operand or tuple
      41 42 43  | 
    
      # File 'lib/axiom/function.rb', line 41 def self.extract_value(operand, tuple) operand.respond_to?(:call) ? operand.call(tuple) : operand end  | 
  
.rename_attributes(operand, aliases) ⇒ Function
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
    TODO:
    
  
simplify once Attribute#rename works the same as Function#rename
Rename the attribute(s) inside the function
      23 24 25 26 27 28 29  | 
    
      # File 'lib/axiom/function.rb', line 23 def self.rename_attributes(operand, aliases) if operand.respond_to?(:rename) && ! operand.kind_of?(Attribute) operand.rename(aliases) else aliases[operand] end end  |