Class: Assets::Compiler::Checker
- Inherits:
-
Object
- Object
- Assets::Compiler::Checker
- Defined in:
- lib/assets/compiler/checker.rb
Instance Attribute Summary collapse
-
#compiler ⇒ Object
Returns the value of attribute compiler.
Instance Method Summary collapse
-
#initialize(_compiler) ⇒ Checker
constructor
A new instance of Checker.
- #outdated_files ⇒ Object
Constructor Details
#initialize(_compiler) ⇒ Checker
Returns a new instance of Checker.
6 7 8 |
# File 'lib/assets/compiler/checker.rb', line 6 def initialize(_compiler) self.compiler = _compiler end |
Instance Attribute Details
#compiler ⇒ Object
Returns the value of attribute compiler.
4 5 6 |
# File 'lib/assets/compiler/checker.rb', line 4 def compiler @compiler end |
Instance Method Details
#outdated_files ⇒ Object
10 11 12 13 14 15 |
# File 'lib/assets/compiler/checker.rb', line 10 def outdated_files files.select do |file| compiled_file = compiler.destination_for_file(file) !File.exists?(compiled_file) || File.mtime(file) > File.mtime(compiled_file) end end |