class RailsApiModel::Filters::BaseFilter

Attributes

api_model[R]
filter_key[R]

Public Class Methods

new(api_model, filter_key) click to toggle source
# File lib/rails_api_model/filters/base_filter.rb, line 6
def initialize(api_model, filter_key)
  @api_model = api_model
  @filter_key = filter_key
end

Public Instance Methods

==(other) click to toggle source
# File lib/rails_api_model/filters/base_filter.rb, line 15
def ==(other)
  api_model  == other.api_model  &&
  filter_key == other.filter_key
end
Also aliased as: eql?
apply_scope(relation, key, value) click to toggle source
# File lib/rails_api_model/filters/base_filter.rb, line 11
def apply_scope(relation, key, value)
  raise 'Not implemented in the base class'
end
ar_model() click to toggle source
# File lib/rails_api_model/filters/base_filter.rb, line 22
def ar_model
  api_model.ar_model
end
eql?(other)
Alias for: ==