Class: Linner::Reactor::Client

Inherits:
Object
  • Object
show all
Includes:
Celluloid
Defined in:
lib/linner/reactor.rb

Instance Method Summary collapse

Constructor Details

#initialize(socket) ⇒ Client

Returns a new instance of Client.



72
73
74
# File 'lib/linner/reactor.rb', line 72

def initialize(socket)
  @socket = socket
end

Instance Method Details

#notify_asset_change(path) ⇒ Object



76
77
78
79
80
81
82
83
84
# File 'lib/linner/reactor.rb', line 76

def notify_asset_change(path)
  data = {
    :path     => path,
    :command  => 'reload',
    :liveCSS  => true
  }
  @socket << JSON.generate(data)
rescue
end