lib/plezi/handlers/ws_object.rb in plezi-0.10.13 vs lib/plezi/handlers/ws_object.rb in plezi-0.10.14
- old
+ new
@@ -33,10 +33,11 @@
GReactor.warn "Broadcast message unknown... falling back on base broadcasting"
return super(data) if defined? super
return false
end
return false if data[:type] && data[:type] != :all && !self.is_a?(data[:type])
+ # return ( self.class.placebo? ? true : we.write(ws.data)) if :method == :to_client
return ((data[:type] == :all) ? false : (raise "Broadcasting recieved but no method can handle it - dump:\r\n #{data.to_s}") ) unless self.class.has_super_method?(data[:method])
self.method(data[:method]).call *data[:data]
end
# Performs a websocket unicast to the specified target.
@@ -127,9 +128,12 @@
end
module SuperClassMethods
public
+
+ # answers the question if this is a placebo object.
+ def placebo?; false end
# WebSockets: fires an event on all of this controller's active websocket connections.
#
# Class method.
#