Class: Arel::Compatibility::Wheres

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/arel/compatibility/wheres.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Value

Instance Method Summary collapse

Constructor Details

#initialize(engine, collection) ⇒ Wheres

Returns a new instance of Wheres.



18
19
20
21
# File 'lib/arel/compatibility/wheres.rb', line 18

def initialize engine, collection
  @engine     = engine
  @collection = collection
end

Instance Method Details

#eachObject



23
24
25
26
27
28
29
30
31
# File 'lib/arel/compatibility/wheres.rb', line 23

def each
  to_sql = Visitors::ToSql.new @engine

  @collection.each { |c|
    c.extend(Value)
    c.visitor = to_sql
    yield c
  }
end