Module: CheckFiles
- Defined in:
- lib/check_files.rb,
lib/check_files/checker.rb,
lib/check_files/railtie.rb,
lib/check_files/version.rb,
lib/check_files/middleware.rb,
lib/check_files/notifiers/logging.rb,
lib/check_files/notifiers/restart.rb,
lib/check_files/notifiers/exception.rb
Defined Under Namespace
Modules: Notifiers
Classes: Checker, Middleware, Railtie
Constant Summary
collapse
- VERSION =
"0.1.0"
Class Method Summary
collapse
Class Method Details
.check! ⇒ Object
24
25
26
27
|
# File 'lib/check_files.rb', line 24
def self.check!
change = checkers.find(&:changed?)
config.notifier.call(change) if change
end
|
.checkers ⇒ Object
16
17
18
|
# File 'lib/check_files.rb', line 16
def self.checkers
@checkers ||= config.paths.map {|path| Checker.new(path) }
end
|
.config ⇒ Object
12
13
14
|
# File 'lib/check_files.rb', line 12
def self.config
Rails.application.config.check_files
end
|
.reset ⇒ Object
20
21
22
|
# File 'lib/check_files.rb', line 20
def self.reset
@checkers = nil
end
|