Sha256: ae98ba03a76948162cec131e936b338b1c68b3a02d50bb11d0c26995d9df5ed6

Contents?: true

Size: 702 Bytes

Versions: 10

Compression:

Stored size: 702 Bytes

Contents

require_relative "tagged_with_query/query_base"
require_relative "tagged_with_query/exclude_tags_query"
require_relative "tagged_with_query/any_tags_query"
require_relative "tagged_with_query/all_tags_query"

module MakeTaggable::Taggable::TaggedWithQuery
  def self.build(taggable_model, tag_model, tagging_model, tag_list, options)
    if options[:exclude].present?
      ExcludeTagsQuery.new(taggable_model, tag_model, tagging_model, tag_list, options).build
    elsif options[:any].present?
      AnyTagsQuery.new(taggable_model, tag_model, tagging_model, tag_list, options).build
    else
      AllTagsQuery.new(taggable_model, tag_model, tagging_model, tag_list, options).build
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
make_taggable-0.7.5 lib/make_taggable/taggable/tagged_with_query.rb
make_taggable-0.7.4 lib/make_taggable/taggable/tagged_with_query.rb
make_taggable-0.7.3 lib/make_taggable/taggable/tagged_with_query.rb
make_taggable-0.7.2 lib/make_taggable/taggable/tagged_with_query.rb
make_taggable-0.7.1 lib/make_taggable/taggable/tagged_with_query.rb
make_taggable-0.7.0 lib/make_taggable/taggable/tagged_with_query.rb
make_taggable-0.6.6 lib/make_taggable/taggable/tagged_with_query.rb
make_taggable-0.6.5 lib/make_taggable/taggable/tagged_with_query.rb
make_taggable-0.6.4 lib/make_taggable/taggable/tagged_with_query.rb
make_taggable-0.6.3 lib/make_taggable/taggable/tagged_with_query.rb