Method: Inversion::Template#changed?
- Defined in:
- lib/inversion/template.rb
#changed? ⇒ Boolean
Returns true
if the template was loaded from a file and the file’s mtime is after the time the template was created.
330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/inversion/template.rb', line 330 def changed? return false unless file = self.source_file now = Time.now if now > ( @last_checked + self.[ :stat_delay ].to_i ) if file.mtime > @last_checked @last_checked = now return true end end return false end |