Module: RailsSpotlight::Channels::Handlers
- Defined in:
- lib/rails_spotlight/channels/handlers.rb,
lib/rails_spotlight/channels/handlers/logs_handler.rb,
lib/rails_spotlight/channels/handlers/live_console_handler.rb
Defined Under Namespace
Classes: LiveConsoleHandler, LogsHandler
Constant Summary collapse
- ResponseError =
Class.new(StandardError) do def initialize(, code: :error) @code = code super() end attr_reader :code end
- TYPES =
[LiveConsoleHandler::TYPE, LogsHandler::TYPE].freeze
Class Method Summary collapse
Class Method Details
.handle(data) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/rails_spotlight/channels/handlers.rb', line 19 def self.handle(data) case data['type'] when LiveConsoleHandler::TYPE then LiveConsoleHandler.new(data).call when LogsHandler::TYPE then LogsHandler.new(data).call end end |