Class: Wordpress::Request
Constant Summary collapse
- END_POINT =
"https://public-api.wordpress.com/"
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#method ⇒ Object
Returns the value of attribute method.
-
#params ⇒ Object
Returns the value of attribute params.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #end_point ⇒ Object
-
#initialize(method, url, params = {}, body = {}) ⇒ Request
constructor
A new instance of Request.
- #initialize_copy(other) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(method, url, params = {}, body = {}) ⇒ Request
Returns a new instance of Request.
8 9 10 11 12 13 |
# File 'lib/wordpress/request.rb', line 8 def initialize(method, url, params = {}, body = {}) @method = method @url = URI.join(end_point, url).to_s @params = params.dup @body = body.dup end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
6 7 8 |
# File 'lib/wordpress/request.rb', line 6 def body @body end |
#method ⇒ Object
Returns the value of attribute method.
6 7 8 |
# File 'lib/wordpress/request.rb', line 6 def method @method end |
#params ⇒ Object
Returns the value of attribute params.
6 7 8 |
# File 'lib/wordpress/request.rb', line 6 def params @params end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/wordpress/request.rb', line 6 def url @url end |