Module: HtmlNamespacing::Plugin::Sass
- Defined in:
- lib/html_namespacing/plugin/sass.rb
Defined Under Namespace
Modules: Sass_2_2
Class Attribute Summary collapse
-
.options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
- .install(options = {}) ⇒ Object
- .sass_options ⇒ Object
- .styles_for(relative_path, absolute_path) ⇒ Object
Class Attribute Details
.options ⇒ Object (readonly)
Returns the value of attribute options.
14 15 16 |
# File 'lib/html_namespacing/plugin/sass.rb', line 14 def end |
Class Method Details
.install(options = {}) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/html_namespacing/plugin/sass.rb', line 5 def install( = {}) [:prefix] ||= 'views' [:callback] ||= lambda { |p| HtmlNamespacing::Plugin.default_relative_path_to_namespace(p) } [:compress] ||= false = Sass_2_2.install() HtmlNamespacing.[:styles_for] = method(:styles_for) end |
.sass_options ⇒ Object
16 17 18 |
# File 'lib/html_namespacing/plugin/sass.rb', line 16 def ::Sass::Plugin. end |
.styles_for(relative_path, absolute_path) ⇒ Object
20 21 22 23 24 |
# File 'lib/html_namespacing/plugin/sass.rb', line 20 def styles_for(relative_path, absolute_path) # Assume the file exists. (If it was found by GlobFu, it should.) css_path = File.join([:css_location], self.[:prefix], relative_path.sub(/\.[^\.\/]*\z/, '.css')) File.read(css_path) end |