Files

Class Index [+]

Quicksearch

Arel::Predicates::Polyadic

Attributes

predicates[R]

Public Class Methods

build(operator, operand1, *additional_operands) click to toggle source

Build a Polyadic predicate based on:

    # File lib/arel/algebra/predicates.rb, line 33
33:       def self.build(operator, operand1, *additional_operands)
34:         new(
35:           *additional_operands.uniq.map do |operand|
36:             operator.new(operand1, operand)
37:           end
38:         )
39:       end
new(*predicates) click to toggle source
    # File lib/arel/algebra/predicates.rb, line 24
24:       def initialize(*predicates)
25:         @predicates = predicates
26:       end

Public Instance Methods

==(other) click to toggle source
    # File lib/arel/algebra/predicates.rb, line 41
41:       def ==(other)
42:         super || predicates == other.predicates
43:       end
bind(relation) click to toggle source
    # File lib/arel/algebra/predicates.rb, line 45
45:       def bind(relation)
46:         self.class.new(
47:           *predicates.map {|p| p.find_correlate_in(relation)}
48:         )
49:       end
eval(row) click to toggle source
    # File lib/arel/algebra/predicates.rb, line 51
51:       def eval(row)
52:         predicates.send(compounder) do |operation|
53:           operation.eval(row)
54:         end
55:       end
to_sql(formatter = nil) click to toggle source
    # File lib/arel/algebra/predicates.rb, line 57
57:       def to_sql(formatter = nil)
58:         "(" +
59:           predicates.map {|p| p.to_sql(formatter)}.join(" #{predicate_sql} ") +
60:         ")"
61:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.