Class: FortyFacets::FilterDefinition
- Inherits:
-
Object
- Object
- FortyFacets::FilterDefinition
- Defined in:
- lib/forty_facets/filter_definition.rb
Overview
Base class for the classes storing the definition of differently behaving filters
Direct Known Subclasses
CustomFilterDefinition, FacetFilterDefinition, RangeFilterDefinition, ScopeFilterDefinition, SqlFacetFilterDefinition, TextFilterDefinition
Instance Attribute Summary collapse
-
#association ⇒ Object
readonly
Returns the value of attribute association.
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#column_name ⇒ Object
readonly
Returns the value of attribute column_name.
-
#joins ⇒ Object
readonly
Returns the value of attribute joins.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#origin_class ⇒ Object
readonly
Returns the value of attribute origin_class.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#search ⇒ Object
readonly
Returns the value of attribute search.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
-
#initialize(search, path, options) ⇒ FilterDefinition
constructor
A new instance of FilterDefinition.
- #qualified_column_name ⇒ Object
- #request_param ⇒ Object
Constructor Details
#initialize(search, path, options) ⇒ FilterDefinition
Returns a new instance of FilterDefinition.
8 9 10 11 12 13 14 |
# File 'lib/forty_facets/filter_definition.rb', line 8 def initialize search, path, @search = search @path = [path].flatten @options = init_associations end |
Instance Attribute Details
#association ⇒ Object (readonly)
Returns the value of attribute association.
5 6 7 |
# File 'lib/forty_facets/filter_definition.rb', line 5 def association @association end |
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
5 6 7 |
# File 'lib/forty_facets/filter_definition.rb', line 5 def attribute @attribute end |
#column_name ⇒ Object (readonly)
Returns the value of attribute column_name.
5 6 7 |
# File 'lib/forty_facets/filter_definition.rb', line 5 def column_name @column_name end |
#joins ⇒ Object (readonly)
Returns the value of attribute joins.
5 6 7 |
# File 'lib/forty_facets/filter_definition.rb', line 5 def joins @joins end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/forty_facets/filter_definition.rb', line 5 def @options end |
#origin_class ⇒ Object (readonly)
Returns the value of attribute origin_class.
5 6 7 |
# File 'lib/forty_facets/filter_definition.rb', line 5 def origin_class @origin_class end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/forty_facets/filter_definition.rb', line 5 def path @path end |
#search ⇒ Object (readonly)
Returns the value of attribute search.
5 6 7 |
# File 'lib/forty_facets/filter_definition.rb', line 5 def search @search end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
5 6 7 |
# File 'lib/forty_facets/filter_definition.rb', line 5 def table_name @table_name end |
Instance Method Details
#qualified_column_name ⇒ Object
20 21 22 |
# File 'lib/forty_facets/filter_definition.rb', line 20 def qualified_column_name "#{table_name}.#{column_name}" end |
#request_param ⇒ Object
16 17 18 |
# File 'lib/forty_facets/filter_definition.rb', line 16 def request_param path.join('-') end |