Class: Schoolkeep::Views::AssetCache

Inherits:
Object
  • Object
show all
Defined in:
lib/schoolkeep/views/asset_cache.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host) ⇒ AssetCache

Returns a new instance of AssetCache.



9
10
11
# File 'lib/schoolkeep/views/asset_cache.rb', line 9

def initialize(host)
  @host = host
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



7
8
9
# File 'lib/schoolkeep/views/asset_cache.rb', line 7

def host
  @host
end

Instance Method Details

#[](path) ⇒ Object



13
14
15
# File 'lib/schoolkeep/views/asset_cache.rb', line 13

def [](path)
  cached_get(path) || path
end