Class: Metka::QueryBuilder
- Inherits:
-
Object
- Object
- Metka::QueryBuilder
- Defined in:
- lib/metka/query_builder.rb
Instance Method Summary collapse
Instance Method Details
#call(taggable_model, column, tag_list, options) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/metka/query_builder.rb', line 11 def call(taggable_model, column, tag_list, ) if [:exclude_all].present? ExcludeAllTagsQuery.instance.call(taggable_model, column, tag_list) elsif [:exclude_any].present? ExcludeAnyTagsQuery.instance.call(taggable_model, column, tag_list) elsif [:any].present? AnyTagsQuery.instance.call(taggable_model, column, tag_list) else AllTagsQuery.instance.call(taggable_model, column, tag_list) end end |