Sha256: 28424ab9fdb25e67ea73264b4d6976e3eca4300dd57481a43980b8bee8ef493a

Contents?: true

Size: 527 Bytes

Versions: 5

Compression:

Stored size: 527 Bytes

Contents

require 'webmate/responders/abstract'
module Webmate::Responders
  class Base < Abstract
    after_filter :_run_observer_callbacks
    after_filter :_send_websocket_events

    def _send_websocket_events
      packet = Webmate::SocketIO::Packets::Message.new(@response.packed)

      #async do
      #  #Webmate::Websockets.publish(params[:channel], packet.to_packet)
      #end
    end

    def _run_observer_callbacks
      async do
        Webmate::Observers::Base.execute_all(action, @response)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
webmate-0.1.4 lib/webmate/responders/base.rb
webmate-0.1.3 lib/webmate/responders/base.rb
webmate-0.1.2 lib/webmate/responders/base.rb
webmate-0.1.1 lib/webmate/responders/base.rb
webmate-0.1.0 lib/webmate/responders/base.rb