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


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

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

Instance Method Details

#eachObject


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

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

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