Sha256: 39bf2ecbb85e71ab63ee901bc1275d57677fc34d9e2bde585d688d83329226c7

Contents?: true

Size: 598 Bytes

Versions: 176

Compression:

Stored size: 598 Bytes

Contents

module Arel
  module Compatibility # :nodoc:
    class Wheres # :nodoc:
      include Enumerable

      module Value # :nodoc:
        attr_accessor :visitor
        def value
          visitor.accept self
        end

        def name
          super.to_sym
        end
      end

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

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

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

Version data entries

176 entries across 154 versions & 23 rubygems

Version Path
arel-2.1.1 lib/arel/compatibility/wheres.rb
square-arel-2.0.9.20110222133018 lib/arel/compatibility/wheres.rb
arel-2.1.0 lib/arel/compatibility/wheres.rb
arel-2.0.9 lib/arel/compatibility/wheres.rb
arel-2.0.9.rc1 lib/arel/compatibility/wheres.rb
arel-2.0.8 lib/arel/compatibility/wheres.rb
arel-2.0.8.beta.20110131120940 lib/arel/compatibility/wheres.rb
arel-2.0.7 lib/arel/compatibility/wheres.rb
arel-2.0.7.beta.20110110114925 lib/arel/compatibility/wheres.rb
arel-2.0.6 lib/arel/compatibility/wheres.rb
arel-2.0.5 lib/arel/compatibility/wheres.rb
arel-2.0.4 lib/arel/compatibility/wheres.rb
arel-2.0.3 lib/arel/compatibility/wheres.rb
arel-2.0.2 lib/arel/compatibility/wheres.rb
arel-2.0.1 lib/arel/compatibility/wheres.rb
arel-2.0.0 lib/arel/compatibility/wheres.rb