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.



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

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

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



4
5
6
# File 'lib/concourse/http.rb', line 4

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



4
5
6
# File 'lib/concourse/http.rb', line 4

def headers
  @headers
end

#urlObject (readonly)

Returns the value of attribute url.



4
5
6
# File 'lib/concourse/http.rb', line 4

def url
  @url
end

Instance Method Details

#==(other) ⇒ Object



12
13
14
# File 'lib/concourse/http.rb', line 12

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

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/concourse/http.rb', line 16

def eql?(other)
  self == other
end

#hashObject



20
21
22
# File 'lib/concourse/http.rb', line 20

def hash
  state.hash
end