From 14150889c55d6993dde6df52ea7e9ddf94aeecb4 Mon Sep 17 00:00:00 2001 From: Michael Kessler Date: Wed, 28 Sep 2011 13:46:05 +0200 Subject: [PATCH] Align variable assignment, make return variable clear. --- lib/guard/listener.rb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/guard/listener.rb b/lib/guard/listener.rb index a6d6104db..38cfef4ac 100644 --- a/lib/guard/listener.rb +++ b/lib/guard/listener.rb @@ -47,14 +47,14 @@ def self.select_and_init(*args) # @option options [Array] ignore_paths the paths to ignore by the listener # def initialize(directory = Dir.pwd, options = {}) - @directory = directory.to_s - @sha1_checksums_hash = {} - @file_timestamp_hash = {} - @relativize_paths = options.fetch(:relativize_paths, true) - @changed_files = [] - @locked = false - @ignore_paths = DEFAULT_IGNORE_PATHS - @ignore_paths |= options[:ignore_paths] if options[:ignore_paths] + @directory = directory.to_s + @sha1_checksums_hash = {} + @file_timestamp_hash = {} + @relativize_paths = options.fetch(:relativize_paths, true) + @changed_files = [] + @locked = false + @ignore_paths = DEFAULT_IGNORE_PATHS + @ignore_paths |= options[:ignore_paths] if options[:ignore_paths] @watch_all_modifications = options.fetch(:watch_all_modifications, false) update_last_event @@ -150,6 +150,7 @@ def modified_files(dirs, options = {}) end update_last_event files.concat(potentially_modified_files(dirs, options).select { |path| file_modified?(path, last_event) }) + relativize_paths(files) end