Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
show all
- Includes:
- Cash
- Defined in:
- lib/cache_money.rb
Constant Summary
Constants included
from Cash
Cash::Request, Cash::VERSION
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Cash
configure, included
Class Method Details
.is_cached(options = {}) ⇒ Object
91
92
93
94
95
96
|
# File 'lib/cache_money.rb', line 91
def self.is_cached(options = {})
options.assert_valid_keys(:ttl, :repository, :version)
opts = options.dup
opts[:repository] = Cash.repository unless opts.has_key?(:repository)
Cash::Config.create(self, opts)
end
|
Instance Method Details
#<=>(other) ⇒ Object
98
99
100
101
102
103
104
|
# File 'lib/cache_money.rb', line 98
def <=>(other)
if self.id == other.id then
0
else
self.id < other.id ? -1 : 1
end
end
|