Class: Octopress::AssetPipeline::Css
- Inherits:
-
Asset
- Object
- Ink::Assets::Asset
- Asset
- Octopress::AssetPipeline::Css
show all
- Defined in:
- lib/octopress-asset-pipeline/assets/css.rb
Direct Known Subclasses
Sass
Instance Attribute Summary
Attributes inherited from Asset
#file_object
Instance Method Summary
collapse
Methods inherited from Asset
#base, #copy, #filename, #info, #initialize, #path
Instance Method Details
#destination ⇒ Object
8
9
10
|
# File 'lib/octopress-asset-pipeline/assets/css.rb', line 8
def destination
File.join(base, output_file_name)
end
|
4
5
6
|
# File 'lib/octopress-asset-pipeline/assets/css.rb', line 4
def media
path.to_s.scan(/@(.+?)\./).flatten[0] || 'all'
end
|
#output_file_name ⇒ Object
16
17
18
|
# File 'lib/octopress-asset-pipeline/assets/css.rb', line 16
def output_file_name
filename.sub(/@/,'-')
end
|
#tag ⇒ Object
12
13
14
|
# File 'lib/octopress-asset-pipeline/assets/css.rb', line 12
def tag
"<link href='#{Filters.expand_url(destination)}' media='#{media}' rel='stylesheet' type='text/css'>"
end
|