Class: ApiModel::HttpRequest
- Inherits:
-
Object
- Object
- ApiModel::HttpRequest
- Includes:
- Initializer
- Defined in:
- lib/api_model/http_request.rb
Instance Attribute Summary collapse
-
#api_call ⇒ Object
Returns the value of attribute api_call.
-
#builder ⇒ Object
Returns the value of attribute builder.
-
#cache_id ⇒ Object
Returns the value of attribute cache_id.
-
#config ⇒ Object
Returns the value of attribute config.
-
#method ⇒ Object
Returns the value of attribute method.
-
#options ⇒ Object
Returns the value of attribute options.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Methods included from Initializer
Methods included from Assignment
Instance Attribute Details
#api_call ⇒ Object
Returns the value of attribute api_call.
5 6 7 |
# File 'lib/api_model/http_request.rb', line 5 def api_call @api_call end |
#builder ⇒ Object
Returns the value of attribute builder.
5 6 7 |
# File 'lib/api_model/http_request.rb', line 5 def builder @builder end |
#cache_id ⇒ Object
Returns the value of attribute cache_id.
5 6 7 |
# File 'lib/api_model/http_request.rb', line 5 def cache_id @cache_id end |
#config ⇒ Object
Returns the value of attribute config.
5 6 7 |
# File 'lib/api_model/http_request.rb', line 5 def config @config end |
#method ⇒ Object
Returns the value of attribute method.
5 6 7 |
# File 'lib/api_model/http_request.rb', line 5 def method @method end |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/api_model/http_request.rb', line 5 def @options end |
#path ⇒ Object
Returns the value of attribute path.
5 6 7 |
# File 'lib/api_model/http_request.rb', line 5 def path @path end |
Instance Method Details
#full_path ⇒ Object
40 41 42 43 |
# File 'lib/api_model/http_request.rb', line 40 def full_path return path if path =~ /^http/ "#{config.host}#{path}" end |
#request_method ⇒ Object
45 46 47 |
# File 'lib/api_model/http_request.rb', line 45 def request_method api_call.request.[:method] end |