Class: Shakapacker::MtimeStrategy
- Inherits:
-
BaseStrategy
- Object
- BaseStrategy
- Shakapacker::MtimeStrategy
- Defined in:
- lib/shakapacker/mtime_strategy.rb
Instance Method Summary collapse
-
#fresh? ⇒ Boolean
Returns true if manifest file mtime is newer than the timestamp of the last modified watched file.
-
#stale? ⇒ Boolean
Returns true if manifest file mtime is older than the timestamp of the last modified watched file.
Methods inherited from BaseStrategy
#after_compile_hook, #initialize
Constructor Details
This class inherits a constructor from Shakapacker::BaseStrategy
Instance Method Details
#fresh? ⇒ Boolean
Returns true if manifest file mtime is newer than the timestamp of the last modified watched file
6 7 8 |
# File 'lib/shakapacker/mtime_strategy.rb', line 6 def fresh? manifest_mtime > end |
#stale? ⇒ Boolean
Returns true if manifest file mtime is older than the timestamp of the last modified watched file
11 12 13 |
# File 'lib/shakapacker/mtime_strategy.rb', line 11 def stale? !fresh? end |