Class: Assets::Compiler::Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/assets/compiler/checker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#compilerObject

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_filesObject



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