Class: Shakapacker::MtimeStrategy
- Inherits:
-
BaseStrategy
- Object
- BaseStrategy
- Shakapacker::MtimeStrategy
- Defined in:
- sig/shakapacker/compiler_strategy.rbs,
lib/shakapacker/mtime_strategy.rb
Overview
Mtime-based compiler strategy
Instance Attribute Summary
Attributes inherited from BaseStrategy
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, #default_watched_paths, #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 |