Class: CassetteRack::Decorator::Request
- Inherits:
-
Object
- Object
- CassetteRack::Decorator::Request
- Defined in:
- lib/cassette-rack/decorator/request.rb
Instance Method Summary collapse
-
#initialize(request) ⇒ Request
constructor
A new instance of Request.
- #method ⇒ Object
- #path ⇒ Object
- #to_liquid ⇒ Object
Constructor Details
#initialize(request) ⇒ Request
Returns a new instance of Request.
4 5 6 |
# File 'lib/cassette-rack/decorator/request.rb', line 4 def initialize(request) @request = request end |
Instance Method Details
#method ⇒ Object
15 16 17 |
# File 'lib/cassette-rack/decorator/request.rb', line 15 def method @request.method.to_s.upcase end |
#path ⇒ Object
19 20 21 |
# File 'lib/cassette-rack/decorator/request.rb', line 19 def path URI.parse(@request.uri).path end |
#to_liquid ⇒ Object
8 9 10 11 12 13 |
# File 'lib/cassette-rack/decorator/request.rb', line 8 def to_liquid { 'method' => method, 'path' => path } end |