Class: JsonApiFilter::FieldFilters::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/json_api_filter/field_filters/base.rb

Direct Known Subclasses

Compare, Matcher, Pagination, Searcher, Sorter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, values, association: false) ⇒ Base

Returns a new instance of Base.

Parameters:

  • scope (ActiveRecord::Base)
  • values (Hash)
  • association (Boolean) (defaults to: false)


10
11
12
13
14
# File 'lib/json_api_filter/field_filters/base.rb', line 10

def initialize(scope, values, association: false )
  @scope = scope
  @values = values
  @association = association
end

Instance Attribute Details

#associationObject (readonly)

Returns the value of attribute association.



5
6
7
# File 'lib/json_api_filter/field_filters/base.rb', line 5

def association
  @association
end

#scopeObject (readonly)

Returns the value of attribute scope.



5
6
7
# File 'lib/json_api_filter/field_filters/base.rb', line 5

def scope
  @scope
end

#valuesObject (readonly)

Returns the value of attribute values.



5
6
7
# File 'lib/json_api_filter/field_filters/base.rb', line 5

def values
  @values
end