Class: Smooth::Collection::Query
- Inherits:
-
Hash
- Object
- Hash
- Smooth::Collection::Query
- Defined in:
- lib/smooth/collection/query.rb
Instance Method Summary collapse
- #cache_key ⇒ Object
-
#initialize(options = {}) ⇒ Query
constructor
A new instance of Query.
Constructor Details
#initialize(options = {}) ⇒ Query
Returns a new instance of Query.
5 6 7 |
# File 'lib/smooth/collection/query.rb', line 5 def initialize ={} self.merge!() end |
Instance Method Details
#cache_key ⇒ Object
9 10 11 |
# File 'lib/smooth/collection/query.rb', line 9 def cache_key self.keys.sort.inject([]) {|memo, key| memo << "#{ key }:#{ self.send(:[], key) }" }.join("/") end |