Class: Ucenter::Tools::Base
- Inherits:
-
Object
- Object
- Ucenter::Tools::Base
- Defined in:
- lib/ucenter/tools/base.rb
Overview
The Base class of API
Instance Method Summary collapse
- #get(path, opts = {}, &block) ⇒ Object
-
#initialize(client) ⇒ Base
constructor
A new instance of Base.
- #post(path, opts = {}, &block) ⇒ Object
Constructor Details
#initialize(client) ⇒ Base
Returns a new instance of Base.
5 6 7 |
# File 'lib/ucenter/tools/base.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#get(path, opts = {}, &block) ⇒ Object
9 10 11 |
# File 'lib/ucenter/tools/base.rb', line 9 def get(path, opts={}, &block) request(:get, path, opts, &block) end |
#post(path, opts = {}, &block) ⇒ Object
13 14 15 |
# File 'lib/ucenter/tools/base.rb', line 13 def post(path, opts={}, &block) request(:post, path, opts, &block) end |