Class: Voorhees::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/voorhees/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_uriObject

Returns the value of attribute base_uri.



16
17
18
# File 'lib/voorhees/request.rb', line 16

def base_uri
  @base_uri
end

#defaultsObject

Returns the value of attribute defaults.



16
17
18
# File 'lib/voorhees/request.rb', line 16

def defaults
  @defaults
end

#hierarchyObject

Returns the value of attribute hierarchy.



16
17
18
# File 'lib/voorhees/request.rb', line 16

def hierarchy
  @hierarchy
end

#http_methodObject

Returns the value of attribute http_method.



16
17
18
# File 'lib/voorhees/request.rb', line 16

def http_method
  @http_method
end

#parametersObject

Returns the value of attribute parameters.



16
17
18
# File 'lib/voorhees/request.rb', line 16

def parameters
  @parameters
end

#pathObject

Returns the value of attribute path.



16
17
18
# File 'lib/voorhees/request.rb', line 16

def path
  @path
end

#requiredObject

Returns the value of attribute required.



16
17
18
# File 'lib/voorhees/request.rb', line 16

def required
  @required
end

#retriesObject

Returns the value of attribute retries.



16
17
18
# File 'lib/voorhees/request.rb', line 16

def retries
  @retries
end

#timeoutObject

Returns the value of attribute timeout.



16
17
18
# File 'lib/voorhees/request.rb', line 16

def timeout
  @timeout
end

Instance Method Details

#performObject



60
61
62
63
# File 'lib/voorhees/request.rb', line 60

def perform
  setup_request
  build_response(perform_actual_request)
end

#uriObject



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