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.



28
29
30
31
32
33
34
35
36
# File 'lib/recurly/http.rb', line 28

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.



26
27
28
# File 'lib/recurly/http.rb', line 26

def body
  @body
end

#methodObject

Returns the value of attribute method.



26
27
28
# File 'lib/recurly/http.rb', line 26

def method
  @method
end

#pathObject

Returns the value of attribute path.



26
27
28
# File 'lib/recurly/http.rb', line 26

def path
  @path
end

Instance Method Details

#==(other) ⇒ Object



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

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