Class: RevealCK::Commands::ListenToReloadBrowser

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(ui) ⇒ ListenToReloadBrowser

Returns a new instance of ListenToReloadBrowser.



8
9
10
# File 'lib/reveal-ck/commands/listen_to_reload_browser.rb', line 8

def initialize(ui)
  @prefix = ui.prefix_for(:reload)
end

Instance Attribute Details

#prefixObject (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

#runObject



12
13
14
15
16
# File 'lib/reveal-ck/commands/listen_to_reload_browser.rb', line 12

def run
  sleeping_guard = setup_and_run_guard
  ThreadWaker.new(sleeping_guard).run
  sleeping_guard
end