Class: Shakapacker::MtimeStrategy

Inherits:
BaseStrategy show all
Defined in:
lib/shakapacker/mtime_strategy.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


6
7
8
# File 'lib/shakapacker/mtime_strategy.rb', line 6

def fresh?
  manifest_mtime > latest_modified_timestamp
end

#stale?Boolean

Returns true if manifest file mtime is older than the timestamp of the last modified watched file

Returns:

  • (Boolean)


11
12
13
# File 'lib/shakapacker/mtime_strategy.rb', line 11

def stale?
  !fresh?
end