Class: Cch::Watcher
- Inherits:
-
Object
- Object
- Cch::Watcher
- Includes:
- Commands::Shell
- Defined in:
- lib/cch/watcher.rb
Class Method Summary collapse
Instance Method Summary collapse
- #files ⇒ Object
-
#initialize(commands = nil) ⇒ Watcher
constructor
A new instance of Watcher.
Methods included from Commands::Shell
#backtiq_command, #system_command
Constructor Details
#initialize(commands = nil) ⇒ Watcher
Returns a new instance of Watcher.
9 10 11 |
# File 'lib/cch/watcher.rb', line 9 def initialize(commands = nil) @commands = commands || Cch.setup.watcher_commands end |
Class Method Details
.files ⇒ Object
5 6 7 |
# File 'lib/cch/watcher.rb', line 5 def self.files new.files end |
Instance Method Details
#files ⇒ Object
13 14 15 16 17 |
# File 'lib/cch/watcher.rb', line 13 def files files = @commands.flat_map { |command| backtiq_command(command) }.compact.sort.uniq Cch.logger.info("watched files='#{files}'") files end |