Class: HamlCoffeeAssets::GlobalContext

Inherits:
Object
  • Object
show all
Defined in:
lib/haml_coffee_assets/global_context.rb

Class Method Summary collapse

Class Method Details

.assetObject



3
4
5
# File 'lib/haml_coffee_assets/global_context.rb', line 3

def self.asset
  find_asset(asset_path)
end

.asset_pathObject



7
8
9
# File 'lib/haml_coffee_assets/global_context.rb', line 7

def self.asset_path
  ::HamlCoffeeAssets.config.global_context_asset
end

.bodyObject



16
17
18
19
# File 'lib/haml_coffee_assets/global_context.rb', line 16

def self.body
  return "" if asset.blank?
  asset.body
end

.mtimeObject



11
12
13
14
# File 'lib/haml_coffee_assets/global_context.rb', line 11

def self.mtime
  return nil unless asset.respond_to?(:mtime)
  asset.mtime
end

.to_sObject



21
22
23
24
# File 'lib/haml_coffee_assets/global_context.rb', line 21

def self.to_s
  return "" if asset.blank?
  asset.to_s
end