Sha256: 49b3f4384334ced57d08145c61bcd6e677c98a96f6924728d588700ad45a0cb0

Contents?: true

Size: 649 Bytes

Versions: 11

Compression:

Stored size: 649 Bytes

Contents

module RecordFilter
  class RestrictionFactory # :nodoc: all

    OPERATOR_HASH = {
      :equal_to => Restrictions::EqualTo,
      :is_null => Restrictions::IsNull,
      :less_than => Restrictions::LessThan,
      :less_than_or_equal_to => Restrictions::LessThanOrEqualTo,
      :greater_than => Restrictions::GreaterThan,
      :greater_than_or_equal_to => Restrictions::GreaterThanOrEqualTo,
      :in => Restrictions::In,
      :between => Restrictions::Between,
      :like => Restrictions::Like
    }

    def self.build(operator, column_name, value, options)
      OPERATOR_HASH[operator].new(column_name, value, options)
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
aub-record_filter-0.9.10 lib/record_filter/restriction_factory.rb
aub-record_filter-0.9.11 lib/record_filter/restriction_factory.rb
aub-record_filter-0.9.12 lib/record_filter/restriction_factory.rb
aub-record_filter-0.9.4 lib/record_filter/restriction_factory.rb
aub-record_filter-0.9.5 lib/record_filter/restriction_factory.rb
aub-record_filter-0.9.6 lib/record_filter/restriction_factory.rb
aub-record_filter-0.9.7 lib/record_filter/restriction_factory.rb
aub-record_filter-0.9.8 lib/record_filter/restriction_factory.rb
aub-record_filter-0.9.9 lib/record_filter/restriction_factory.rb
record_filter-0.9.13 lib/record_filter/restriction_factory.rb
record_filter-0.9.12 lib/record_filter/restriction_factory.rb