Class: LiveUpdaterActor
- Includes:
- BasicActor
- Defined in:
- lib/live_updater_actor.rb
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize ⇒ LiveUpdaterActor
constructor
A new instance of LiveUpdaterActor.
- #start ⇒ Object
- #stop ⇒ Object
Methods included from BasicActor
Constructor Details
#initialize ⇒ LiveUpdaterActor
Returns a new instance of LiveUpdaterActor.
8 9 10 11 |
# File 'lib/live_updater_actor.rb', line 8 def initialize @listener = build start end |
Instance Method Details
#build ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/live_updater_actor.rb', line 13 def build Listen.to($LIVE_UPDATE_WATCH_PATH) do |modified, added, removed| "modified absolute path: #{modified}" "added absolute path: #{added}" "removed absolute path: #{removed}" publish "refresh" end end |
#start ⇒ Object
22 23 24 |
# File 'lib/live_updater_actor.rb', line 22 def start @listener.start end |
#stop ⇒ Object
26 27 28 |
# File 'lib/live_updater_actor.rb', line 26 def stop @listener.stop end |