Module: Sass::Plugin
- Defined in:
- lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb,
lib/compass/app_integration/rails/sass_plugin.rb
Overview
XXX: We can remove this monkeypatch once Sass 2.2 is released.
Class Attribute Summary collapse
-
.rails_controller ⇒ Object
Returns the value of attribute rails_controller.
Instance Method Summary collapse
- #exact_stylesheet_needs_update?(css_file, template_file) ⇒ Boolean
- #stylesheet_needs_update?(name, template_path, css_path) ⇒ Boolean
Class Attribute Details
.rails_controller ⇒ Object
Returns the value of attribute rails_controller.
3 4 5 |
# File 'lib/compass/app_integration/rails/sass_plugin.rb', line 3 def rails_controller @rails_controller end |
Instance Method Details
#exact_stylesheet_needs_update?(css_file, template_file) ⇒ Boolean
12 13 14 15 16 17 18 19 20 |
# File 'lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb', line 12 def exact_stylesheet_needs_update?(css_file, template_file) if !File.exists?(css_file) return true else css_mtime = File.mtime(css_file) File.mtime(template_file) > css_mtime || dependencies(template_file).any?(&dependency_updated?(css_mtime)) end end |
#stylesheet_needs_update?(name, template_path, css_path) ⇒ Boolean
7 8 9 10 11 |
# File 'lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb', line 7 def stylesheet_needs_update?(name, template_path, css_path) css_file = css_filename(name, css_path) template_file = template_filename(name, template_path) exact_stylesheet_needs_update?(css_file, template_file) end |