Class: Backblaze::B2::Base
- Inherits:
-
Object
- Object
- Backblaze::B2::Base
- Includes:
- Utils, HTTParty
- Defined in:
- lib/backblaze/b2/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#get(path, options = {}, &block) ⇒ Object
Calls the class level equivalent from HTTParty.
-
#head(path, options = {}, &block) ⇒ Object
(see #get).
-
#post(path, options = {}, &block) ⇒ Object
(see #get).
-
#put(path, options = {}, &block) ⇒ Object
(see #get).
Methods included from Utils
#camelize, included, #underscore
Instance Method Details
#get(path, options = {}, &block) ⇒ Object
Calls the class level equivalent from HTTParty
|
|
# File 'lib/backblaze/b2/base.rb', line 8
|
#head(path, options = {}, &block) ⇒ Object
(see #get)
|
|
# File 'lib/backblaze/b2/base.rb', line 12
|
#post(path, options = {}, &block) ⇒ Object
(see #get)
|
|
# File 'lib/backblaze/b2/base.rb', line 15
|
#put(path, options = {}, &block) ⇒ Object
(see #get)
21 22 23 24 25 |
# File 'lib/backblaze/b2/base.rb', line 21 i[get head post put].each do |req| define_method(req) do |path, = {}, &block| self.class.send(req, path, , &block) end end |