Class: Recurly::HTTP::Request
- Inherits:
-
Object
- Object
- Recurly::HTTP::Request
- Defined in:
- lib/recurly/http.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#method ⇒ Object
Returns the value of attribute method.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(method, path, body = nil) ⇒ Request
constructor
A new instance of Request.
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
#body ⇒ Object
Returns the value of attribute body.
31 32 33 |
# File 'lib/recurly/http.rb', line 31 def body @body end |
#method ⇒ Object
Returns the value of attribute method.
31 32 33 |
# File 'lib/recurly/http.rb', line 31 def method @method end |
#path ⇒ Object
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 |