Class: Concourse::Http::Request

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, headers = {}, body = nil) ⇒ Request

Returns a new instance of Request.



8
9
10
11
12
# File 'lib/concourse/http.rb', line 8

def initialize(url, headers = {}, body = nil)
  @url = url
  @headers = headers
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



6
7
8
# File 'lib/concourse/http.rb', line 6

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



6
7
8
# File 'lib/concourse/http.rb', line 6

def headers
  @headers
end

#urlObject (readonly)

Returns the value of attribute url.



6
7
8
# File 'lib/concourse/http.rb', line 6

def url
  @url
end

Instance Method Details

#==(other) ⇒ Object



14
15
16
# File 'lib/concourse/http.rb', line 14

def ==(other)
  other.class == self.class && other.state == state
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/concourse/http.rb', line 18

def eql?(other)
  self == other
end

#hashObject



22
23
24
# File 'lib/concourse/http.rb', line 22

def hash
  state.hash
end