Class: EmmyHttp::Request
- Inherits:
-
Object
- Object
- EmmyHttp::Request
- Includes:
- ModelPack::Document
- Defined in:
- lib/emmy_http/request.rb
Instance Method Summary collapse
- #await ⇒ Object
- #new_operation ⇒ Object
- #operation ⇒ Object (also: #op)
- #real_path ⇒ Object
- #real_url ⇒ Object
Instance Method Details
#await ⇒ Object
53 54 55 |
# File 'lib/emmy_http/request.rb', line 53 def await operation.await end |
#new_operation ⇒ Object
47 48 49 |
# File 'lib/emmy_http/request.rb', line 47 def new_operation EmmyHttp::Operation.new(self, adapter.new) end |
#operation ⇒ Object Also known as: op
43 44 45 |
# File 'lib/emmy_http/request.rb', line 43 def operation @operation ||= new_operation end |
#real_path ⇒ Object
65 66 67 68 69 70 71 72 |
# File 'lib/emmy_http/request.rb', line 65 def real_path return nil unless path if path.is_a?(Addressable::Template) path.(params) else Addressable::URI.parse(path.to_s) end end |
#real_url ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/emmy_http/request.rb', line 57 def real_url if url.is_a?(Addressable::Template) url.(params) else Addressable::URI.parse(url.to_s) end end |