Class: Plaza::Request
- Inherits:
-
Object
- Object
- Plaza::Request
- Defined in:
- lib/plaza/request.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
- #delete(*args) ⇒ Object
- #get(*args) ⇒ Object
-
#initialize(config_sym = :default) ⇒ Request
constructor
A new instance of Request.
- #post(*args) ⇒ Object
- #put(*args) ⇒ Object
Constructor Details
#initialize(config_sym = :default) ⇒ Request
Returns a new instance of Request.
12 13 14 15 |
# File 'lib/plaza/request.rb', line 12 def initialize(config_sym= :default) @connection = Plaza.connection(config_sym) @logger = Plaza.configuration(config_sym).logger end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
9 10 11 |
# File 'lib/plaza/request.rb', line 9 def client @client end |
#connection ⇒ Object
Returns the value of attribute connection.
9 10 11 |
# File 'lib/plaza/request.rb', line 9 def connection @connection end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
10 11 12 |
# File 'lib/plaza/request.rb', line 10 def logger @logger end |
Instance Method Details
#delete(*args) ⇒ Object
29 30 31 |
# File 'lib/plaza/request.rb', line 29 def delete(*args) Response.new(connection.delete *args) end |
#get(*args) ⇒ Object
17 18 19 |
# File 'lib/plaza/request.rb', line 17 def get(*args) Response.new(connection.get *args) end |
#post(*args) ⇒ Object
21 22 23 |
# File 'lib/plaza/request.rb', line 21 def post(*args) Response.new(connection.post *args) end |
#put(*args) ⇒ Object
25 26 27 |
# File 'lib/plaza/request.rb', line 25 def put(*args) Response.new(connection.put *args) end |