Class: Markedly::CssAsset

Inherits:
Asset
  • Object
show all
Defined in:
lib/markedly/asset.rb

Constant Summary

Constants inherited from Asset

Asset::ASSETS_DIR

Instance Attribute Summary

Attributes inherited from Asset

#href, #name, #path

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Asset

#remote?

Constructor Details

#initialize(path) ⇒ CssAsset

Returns a new instance of CssAsset.



48
49
50
# File 'lib/markedly/asset.rb', line 48

def initialize(path)
  super
end

Class Method Details

.asset(name) ⇒ Object



44
45
46
# File 'lib/markedly/asset.rb', line 44

def self.asset(name)
  assets.find { |asset| asset.name == name }
end

.assetsObject



40
41
42
# File 'lib/markedly/asset.rb', line 40

def self.assets
  Dir["#{Asset::ASSETS_DIR}/*.css"].map {|path| CssAsset.new(path) }
end