lib/plezi/controller/controller.rb in plezi-0.14.1 vs lib/plezi/controller/controller.rb in plezi-0.14.2

- old
+ new

@@ -164,29 +164,29 @@ # end # def poke_back(from) # puts "#{from} is available" # end # - # Methods invoked using {unicast}, {broadcast} or {multicast} will quitely fail if the connection was lost, the requested method is undefined or the 'target' was invalid. + # Methods invoked using {unicast}, {broadcast} or {multicast} will quietly fail if the connection was lost, the requested method is undefined or the 'target' was invalid. def unicast(target, event_method, *args) ::Plezi::Base::MessageDispatch.unicast(id ? self : self.class, target, event_method, args) end - # Invokes a method on every websocket connection that belongs to this Controller / Type. When using Iodine, the method is invoked asynchronously. + # Invokes a method on every websocket connection (except `self`) that belongs to this Controller / Type. When using Iodine, the method is invoked asynchronously. # # self.broadcast :my_method, "argument 1", "argument 2", 3 # - # Methods invoked using {unicast}, {broadcast} or {multicast} will quitely fail if the connection was lost, the requested method is undefined or the 'target' was invalid. + # Methods invoked using {unicast}, {broadcast} or {multicast} will quietly fail if the connection was lost, the requested method is undefined or the 'target' was invalid. def broadcast(event_method, *args) ::Plezi::Base::MessageDispatch.broadcast(id ? self : self.class, event_method, args) end - # Invokes a method on every websocket connection in the application. + # Invokes a method on every websocket connection in the application (except `self`). # # self.multicast :my_method, "argument 1", "argument 2", 3 # - # Methods invoked using {unicast}, {broadcast} or {multicast} will quitely fail if the connection was lost, the requested method is undefined or the 'target' was invalid. + # Methods invoked using {unicast}, {broadcast} or {multicast} will quietly fail if the connection was lost, the requested method is undefined or the 'target' was invalid. def multicast(event_method, *args) ::Plezi::Base::MessageDispatch.multicast(id ? self : self.class, event_method, args) end # @private @@ -237,10 +237,10 @@ end # @private # This function is used internally by Plezi, do not call. def _pl_ad_httpreview(data) - data = data.to_json if self.class._pl_is_ad? && data.is_a?(Hash) + return data.to_json if self.class._pl_is_ad? && data.is_a?(Hash) data end private