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.



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

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.



31
32
33
# File 'lib/recurly/http.rb', line 31

def body
  @body
end

#methodObject

Returns the value of attribute method.



31
32
33
# File 'lib/recurly/http.rb', line 31

def method
  @method
end

#pathObject

Returns the value of attribute path.



31
32
33
# File 'lib/recurly/http.rb', line 31

def path
  @path
end

Instance Method Details

#==(other) ⇒ Object



43
44
45
46
47
# File 'lib/recurly/http.rb', line 43

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