Class: Voorhees::Request
- Inherits:
-
Object
- Object
- Voorhees::Request
- Defined in:
- lib/voorhees/request.rb
Instance Attribute Summary collapse
-
#base_uri ⇒ Object
Returns the value of attribute base_uri.
-
#defaults ⇒ Object
Returns the value of attribute defaults.
-
#hierarchy ⇒ Object
Returns the value of attribute hierarchy.
-
#http_method ⇒ Object
Returns the value of attribute http_method.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#path ⇒ Object
Returns the value of attribute path.
-
#required ⇒ Object
Returns the value of attribute required.
-
#retries ⇒ Object
Returns the value of attribute retries.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(caller_class = nil) ⇒ Request
constructor
A new instance of Request.
- #perform ⇒ Object
- #uri ⇒ Object
Constructor Details
#initialize(caller_class = nil) ⇒ Request
Returns a new instance of Request.
20 21 22 |
# File 'lib/voorhees/request.rb', line 20 def initialize(caller_class=nil) @caller_class = caller_class end |
Instance Attribute Details
#base_uri ⇒ Object
Returns the value of attribute base_uri.
16 17 18 |
# File 'lib/voorhees/request.rb', line 16 def base_uri @base_uri end |
#defaults ⇒ Object
Returns the value of attribute defaults.
16 17 18 |
# File 'lib/voorhees/request.rb', line 16 def defaults @defaults end |
#hierarchy ⇒ Object
Returns the value of attribute hierarchy.
16 17 18 |
# File 'lib/voorhees/request.rb', line 16 def hierarchy @hierarchy end |
#http_method ⇒ Object
Returns the value of attribute http_method.
16 17 18 |
# File 'lib/voorhees/request.rb', line 16 def http_method @http_method end |
#parameters ⇒ Object
Returns the value of attribute parameters.
16 17 18 |
# File 'lib/voorhees/request.rb', line 16 def parameters @parameters end |
#path ⇒ Object
Returns the value of attribute path.
16 17 18 |
# File 'lib/voorhees/request.rb', line 16 def path @path end |
#required ⇒ Object
Returns the value of attribute required.
16 17 18 |
# File 'lib/voorhees/request.rb', line 16 def required @required end |
#retries ⇒ Object
Returns the value of attribute retries.
16 17 18 |
# File 'lib/voorhees/request.rb', line 16 def retries @retries end |
#timeout ⇒ Object
Returns the value of attribute timeout.
16 17 18 |
# File 'lib/voorhees/request.rb', line 16 def timeout @timeout end |
Instance Method Details
#perform ⇒ Object
60 61 62 63 |
# File 'lib/voorhees/request.rb', line 60 def perform setup_request build_response(perform_actual_request) end |
#uri ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/voorhees/request.rb', line 28 def uri u = path.relative? ? URI.parse("#{base_uri}#{path}") : path if query = query_string(u) u.query = query end u end |