Module: Dino
- Defined in:
- lib/dino.rb,
lib/dino/apis.rb,
lib/dino/cache.rb,
lib/dino/models.rb,
lib/dino/clients.rb,
lib/dino/version.rb,
lib/dino/apis/base.rb,
lib/dino/apis/item.rb,
lib/dino/apis/news.rb,
lib/dino/models/base.rb,
lib/dino/models/item.rb,
lib/dino/clients/http.rb,
lib/dino/models/image.rb,
lib/dino/models/video.rb,
lib/dino/clients/cache.rb,
lib/dino/models/meta_data.rb,
lib/dino/models/item_category.rb
Defined Under Namespace
Modules: Apis, Clients, Models
Classes: Cache, Error
Constant Summary
collapse
- VERSION =
'1.0.1'
Class Method Summary
collapse
Class Method Details
.cache ⇒ Object
21
22
23
|
# File 'lib/dino.rb', line 21
def self.cache
@cache ||= defined?(Rails) ? Rails.cache : Cache.new
end
|
.default_expiration ⇒ Object
12
13
14
15
|
# File 'lib/dino.rb', line 12
def self.default_expiration
(@default_expiration || 10) * 60
end
|
.default_expiration=(minutes) ⇒ Object
17
18
19
|
# File 'lib/dino.rb', line 17
def self.default_expiration=(minutes)
@default_expiration = minutes.to_i
end
|