Class: Gutentag::TaggedWith::Query
- Inherits:
-
Object
- Object
- Gutentag::TaggedWith::Query
- Defined in:
- lib/gutentag/tagged_with/query.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(model, values, match) ⇒ Query
constructor
A new instance of Query.
Constructor Details
#initialize(model, values, match) ⇒ Query
Returns a new instance of Query.
4 5 6 7 8 |
# File 'lib/gutentag/tagged_with/query.rb', line 4 def initialize(model, values, match) @model = model @values = Array values @match = match end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'lib/gutentag/tagged_with/query.rb', line 10 def call model.where "#{model_id} #{operator} (#{query.to_sql})" end |