Class: PreparedRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ PreparedRequest

Returns a new instance of PreparedRequest.



5
6
7
8
9
10
# File 'lib/prepared_request.rb', line 5

def initialize(options={})
  @headers = options[:headers] || {}
  @uri = options[:uri] || ''
  @method = options[:method] || :get
  @data = options[:data] || nil
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



3
4
5
# File 'lib/prepared_request.rb', line 3

def data
  @data
end

#headersObject

Returns the value of attribute headers.



3
4
5
# File 'lib/prepared_request.rb', line 3

def headers
  @headers
end

#methodObject

Returns the value of attribute method.



3
4
5
# File 'lib/prepared_request.rb', line 3

def method
  @method
end

#uriObject

Returns the value of attribute uri.



3
4
5
# File 'lib/prepared_request.rb', line 3

def uri
  @uri
end