Sha256: 52074bab37955625f3aff25cc3e3dd9606efb475703c4dcd0ee41f31e54d43eb

Contents?: true

Size: 614 Bytes

Versions: 2

Compression:

Stored size: 614 Bytes

Contents

module RailsLiveDashboard
  class Request < Entry
    attribute :content, Types::RequestContent.new

    def method
      content.method
    end

    def path
      content.path
    end

    def status_code
      content.status
    end

    def controller
      content.controller
    end

    def controller_action
      content.action
    end

    def duration
      content.duration.round
    end

    def payload
      content.params
    end

    def headers
      content.headers
    end

    def body
      content.body
    end

    def turbo_stream?
      content.format == 'turbo_stream'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_live_dashboard-0.1.1 app/models/rails_live_dashboard/request.rb
rails_live_dashboard-0.1.0 app/models/rails_live_dashboard/request.rb