class Sprockets::Webpack::FileGuard
Public Class Methods
new(path)
click to toggle source
# File lib/sprockets/webpack/file_guard.rb, line 4 def initialize(path) @path = Pathname.new(path) @last_mtime = @path.mtime end
Public Instance Methods
detect_change?()
click to toggle source
# File lib/sprockets/webpack/file_guard.rb, line 9 def detect_change? current_mtime = @path.mtime @last_mtime < current_mtime ensure @last_mtime = current_mtime end