Class: RenuoCmsRails::Cache::Cacher

Inherits:
Object
  • Object
show all
Defined in:
lib/renuo_cms_rails/cache/cacher.rb

Instance Method Summary collapse

Constructor Details

#initialize(api) ⇒ Cacher

Returns a new instance of Cacher.



4
5
6
# File 'lib/renuo_cms_rails/cache/cacher.rb', line 4

def initialize(api)
  @api = api
end

Instance Method Details

#get(content_path) ⇒ Object



12
13
14
15
# File 'lib/renuo_cms_rails/cache/cacher.rb', line 12

def get(content_path)
  return unless @contents
  @contents[content_path]
end

#initialize_cacheObject



8
9
10
# File 'lib/renuo_cms_rails/cache/cacher.rb', line 8

def initialize_cache
  @contents = @api.fetch_contents
end