Class: Recurly::HTTP::Request

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method, path, body = nil) ⇒ Request

Returns a new instance of Request.



35
36
37
38
39
40
41
42
43
# File 'lib/recurly/http.rb', line 35

def initialize(method, path, body = nil)
  @method = method
  @path = path
  if body && !body.empty?
    @body = body
  else
    @body = nil
  end
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



33
34
35
# File 'lib/recurly/http.rb', line 33

def body
  @body
end

#methodObject

Returns the value of attribute method.



33
34
35
# File 'lib/recurly/http.rb', line 33

def method
  @method
end

#pathObject

Returns the value of attribute path.



33
34
35
# File 'lib/recurly/http.rb', line 33

def path
  @path
end

Instance Method Details

#==(other) ⇒ Object



45
46
47
48
49
# File 'lib/recurly/http.rb', line 45

def ==(other)
  method == other.method \
    && path == other.path \
    && body == other.body
end