Class: RevealCK::Commands::ListenToReloadBrowser
- Inherits:
-
Object
- Object
- RevealCK::Commands::ListenToReloadBrowser
- Defined in:
- lib/reveal-ck/commands/listen_to_reload_browser.rb
Overview
The idea of listening for file system changes that indicate its time to tell browsers to reload.
Instance Attribute Summary collapse
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
Instance Method Summary collapse
-
#initialize(ui, output_dir) ⇒ ListenToReloadBrowser
constructor
A new instance of ListenToReloadBrowser.
- #run ⇒ Object
Constructor Details
#initialize(ui, output_dir) ⇒ ListenToReloadBrowser
Returns a new instance of ListenToReloadBrowser.
8 9 10 11 |
# File 'lib/reveal-ck/commands/listen_to_reload_browser.rb', line 8 def initialize(ui, output_dir) @prefix = ui.prefix_for(:reload) @output_dir = output_dir end |
Instance Attribute Details
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
6 7 8 |
# File 'lib/reveal-ck/commands/listen_to_reload_browser.rb', line 6 def prefix @prefix end |
Instance Method Details
#run ⇒ Object
13 14 15 16 17 |
# File 'lib/reveal-ck/commands/listen_to_reload_browser.rb', line 13 def run sleeping_guard = setup_and_run_guard ThreadWaker.new(sleeping_guard).run sleeping_guard end |