Parent

Files

WebMock::RequestSignature

Attributes

method[RW]
uri[RW]
body[RW]
headers[RW]

Public Class Methods

new(method, uri, options = {}) click to toggle source
    # File lib/webmock/request_signature.rb, line 7
 7:     def initialize(method, uri, options = {})
 8:       self.method = method
 9:       self.uri = uri.is_a?(Addressable::URI) ? uri : WebMock::Util::URI.normalize_uri(uri)
10:       assign_options(options)
11:     end

Public Instance Methods

to_s() click to toggle source
    # File lib/webmock/request_signature.rb, line 13
13:     def to_s
14:       string = "#{self.method.to_s.upcase}"
15:       string << " #{WebMock::Util::URI.strip_default_port_from_uri_string(self.uri.to_s)}"
16:       string << " with body '#{body.to_s}'" if body && body.to_s != ''
17:       if headers && !headers.empty?
18:         string << " with headers #{WebMock::Util::Headers.sorted_headers_string(headers)}"
19:       end
20:       string
21:     end

Private Instance Methods

assign_options(options) click to toggle source
    # File lib/webmock/request_signature.rb, line 25
25:     def assign_options(options)
26:       self.body = options[:body] if options.has_key?(:body)
27:       self.headers = WebMock::Util::Headers.normalize_headers(options[:headers]) if options.has_key?(:headers)
28:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.