Class: KiskoSuits::Watcher
- Inherits:
-
Object
- Object
- KiskoSuits::Watcher
- Defined in:
- lib/kisko-suits/watcher.rb
Instance Attribute Summary collapse
-
#initial_filename ⇒ Object
readonly
Returns the value of attribute initial_filename.
-
#on_update ⇒ Object
readonly
Returns the value of attribute on_update.
-
#watched_paths ⇒ Object
readonly
Returns the value of attribute watched_paths.
Instance Method Summary collapse
-
#initialize(initial_filename, on_update) ⇒ Watcher
constructor
A new instance of Watcher.
- #start ⇒ Object
Constructor Details
#initialize(initial_filename, on_update) ⇒ Watcher
Returns a new instance of Watcher.
7 8 9 10 11 |
# File 'lib/kisko-suits/watcher.rb', line 7 def initialize(initial_filename, on_update) @initial_filename = initial_filename @on_update = on_update @watched_paths = Set.new end |
Instance Attribute Details
#initial_filename ⇒ Object (readonly)
Returns the value of attribute initial_filename.
5 6 7 |
# File 'lib/kisko-suits/watcher.rb', line 5 def initial_filename @initial_filename end |
#on_update ⇒ Object (readonly)
Returns the value of attribute on_update.
5 6 7 |
# File 'lib/kisko-suits/watcher.rb', line 5 def on_update @on_update end |
#watched_paths ⇒ Object (readonly)
Returns the value of attribute watched_paths.
5 6 7 |
# File 'lib/kisko-suits/watcher.rb', line 5 def watched_paths @watched_paths end |
Instance Method Details
#start ⇒ Object
13 14 15 16 17 |
# File 'lib/kisko-suits/watcher.rb', line 13 def start process_path(initial_filename) add_path(initial_filename) watch end |