Class: Octopress::AssetPipeline::Sass
- Inherits:
-
Css
- Object
- Ink::Assets::Asset
- Asset
- Css
- Octopress::AssetPipeline::Sass
show all
- Defined in:
- lib/octopress-asset-pipeline/assets/sass.rb
Instance Attribute Summary collapse
Attributes inherited from Asset
#file_object
Instance Method Summary
collapse
Methods inherited from Css
#media, #output_file_name, #tag
Methods inherited from Asset
#base, #copy, #filename, #info, #initialize
Instance Attribute Details
#render ⇒ Object
Returns the value of attribute render.
4
5
6
|
# File 'lib/octopress-asset-pipeline/assets/sass.rb', line 4
def render
@render
end
|
Instance Method Details
#add ⇒ Object
18
19
20
|
# File 'lib/octopress-asset-pipeline/assets/sass.rb', line 18
def add
Ink::Plugins.static_files << Ink::StaticFileContent.new(content, destination)
end
|
#content ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/octopress-asset-pipeline/assets/sass.rb', line 26
def content
@render ||= begin
contents = super
if asset_payload = payload
Liquid::Template.parse(contents).render!(payload)
else
contents
end
end
Ink::PluginAssetPipeline.compile_sass(self)
end
|
#data ⇒ Object
22
23
24
|
# File 'lib/octopress-asset-pipeline/assets/sass.rb', line 22
def data
file_object.data
end
|
#destination ⇒ Object
14
15
16
|
# File 'lib/octopress-asset-pipeline/assets/sass.rb', line 14
def destination
super.sub(/\.s[ca]ss$/, '.css')
end
|
#ext ⇒ Object
6
7
8
|
# File 'lib/octopress-asset-pipeline/assets/sass.rb', line 6
def ext
file_object.ext
end
|
#path ⇒ Object
10
11
12
|
# File 'lib/octopress-asset-pipeline/assets/sass.rb', line 10
def path
File.join(Octopress.site.source, file)
end
|