Module: Transport::Common::RequestBuilder::InstanceMethods

Defined in:
lib/transport/common/request_builder.rb

Constant Summary collapse

HTTP_METHODS_WITH_PARAMETERS =
[ :get, :delete, :post, :put ].freeze
HTTP_METHODS_WITH_BODY =
[ :post, :put ].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#http_methodObject (readonly)

Returns the value of attribute http_method.



27
28
29
# File 'lib/transport/common/request_builder.rb', line 27

def http_method
  @http_method
end

#optionsObject (readonly)

Returns the value of attribute options.



29
30
31
# File 'lib/transport/common/request_builder.rb', line 29

def options
  @options
end

#uriObject (readonly)

Returns the value of attribute uri.



30
31
32
# File 'lib/transport/common/request_builder.rb', line 30

def uri
  @uri
end

#urlObject (readonly)

Returns the value of attribute url.



28
29
30
# File 'lib/transport/common/request_builder.rb', line 28

def url
  @url
end

Instance Method Details

#initialize(http_method, url, options = { }) ⇒ Object



32
33
34
35
# File 'lib/transport/common/request_builder.rb', line 32

def initialize(http_method, url, options = { })
  @http_method, @url, @options = http_method, url, options
  @uri = URI.parse @url
end