Sha256: 638b907c3b473ecc766e6a49e4438c6fd41823997e029f211a72782024603b2e

Contents?: true

Size: 376 Bytes

Versions: 9

Compression:

Stored size: 376 Bytes

Contents

module CassetteRack
  module Decorator
    class Request
      def initialize(request)
        @request = request
      end

      def to_liquid
        {
          'method' => method,
          'path' => path
        }
      end

      def method
        @request.method.to_s.upcase
      end

      def path
        URI.parse(@request.uri).path
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cassette-rack-0.10.0 lib/cassette-rack/decorator/request.rb
cassette-rack-0.9.0 lib/cassette-rack/decorator/request.rb
cassette-rack-0.8.1 lib/cassette-rack/decorator/request.rb
cassette-rack-0.8.0 lib/cassette-rack/decorator/request.rb
cassette-rack-0.7.0 lib/cassette-rack/decorator/request.rb
cassette-rack-0.6.0 lib/cassette-rack/decorator/request.rb
cassette-rack-0.5.0 lib/cassette-rack/decorator/request.rb
cassette-rack-0.4.1 lib/cassette-rack/decorator/request.rb
cassette-rack-0.4.0 lib/cassette-rack/decorator/request.rb