Sha256: e6eeccb4580fa3112cd1ee308a8c54a08ee65c9bedd25763c62ee4403cd16e25

Contents?: true

Size: 431 Bytes

Versions: 14

Compression:

Stored size: 431 Bytes

Contents

require 'rom/sql/dsl'

module ROM
  module SQL
    # @api private
    class RestrictionDSL < DSL
      # @api private
      def call(&block)
        instance_exec(&block)
      end

      private

      # @api private
      def method_missing(meth, *args, &block)
        if schema.key?(meth)
          schema[meth]
        else
          ::Sequel::VIRTUAL_ROW.__send__(meth, *args, &block)
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rom-sql-1.3.1 lib/rom/sql/restriction_dsl.rb
rom-sql-1.3.0 lib/rom/sql/restriction_dsl.rb
rom-sql-1.2.2 lib/rom/sql/restriction_dsl.rb
rom-sql-1.2.1 lib/rom/sql/restriction_dsl.rb
rom-sql-1.2.0 lib/rom/sql/restriction_dsl.rb
rom-sql-1.1.2 lib/rom/sql/restriction_dsl.rb
rom-sql-1.1.1 lib/rom/sql/restriction_dsl.rb
rom-sql-1.1.0 lib/rom/sql/restriction_dsl.rb
rom-sql-1.0.3 lib/rom/sql/restriction_dsl.rb
rom-sql-1.0.2 lib/rom/sql/restriction_dsl.rb
rom-sql-1.0.1 lib/rom/sql/restriction_dsl.rb
rom-sql-1.0.0 lib/rom/sql/restriction_dsl.rb
rom-sql-1.0.0.rc2 lib/rom/sql/restriction_dsl.rb
rom-sql-1.0.0.rc1 lib/rom/sql/restriction_dsl.rb