Class: Smooth::Collection::Query

Inherits:
Hash
  • Object
show all
Defined in:
lib/smooth/collection/query.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Query

Returns a new instance of Query.



5
6
7
# File 'lib/smooth/collection/query.rb', line 5

def initialize options={}
  self.merge!(options)
end

Instance Method Details

#cache_keyObject



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