Sha256: 755c17e38d6945ef4c25bc53d9595a88cfa8e573241f09bb6a384e687ca20f40

Contents?: true

Size: 575 Bytes

Versions: 4

Compression:

Stored size: 575 Bytes

Contents

# frozen_string_literal: true

module RailsSpotlight
  module Middlewares
    module Handlers
      class MetaActionHandler < BaseActionHandler
        def execute; end

        private

        def json_response_body
          {
            events: events,
            project: ::RailsSpotlight.config.project_name,
            root_path: ::RailsSpotlight.config.rails_root
          }
        end

        def id
          @id ||= request.params['id']
        end

        def events
          @events ||= Storage.new(id).read || []
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_spotlight-0.2.5 lib/rails_spotlight/middlewares/handlers/meta_action_handler.rb
rails_spotlight-0.2.4 lib/rails_spotlight/middlewares/handlers/meta_action_handler.rb
rails_spotlight-0.2.3 lib/rails_spotlight/middlewares/handlers/meta_action_handler.rb
rails_spotlight-0.2.2 lib/rails_spotlight/middlewares/handlers/meta_action_handler.rb