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.
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
#body ⇒ Object
Returns the value of attribute body.
26 27 28 |
# File 'lib/recurly/http.rb', line 26 def body @body end |
#method ⇒ Object
Returns the value of attribute method.
26 27 28 |
# File 'lib/recurly/http.rb', line 26 def method @method end |
#path ⇒ Object
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 |