Class: Backblaze::B2::Base

Inherits:
Object
  • Object
show all
Includes:
Utils, HTTParty
Defined in:
lib/backblaze/b2/base.rb

Direct Known Subclasses

Bucket, File, FileVersion

Instance Method Summary collapse

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

[:get, :head, :post, :put].each do |req|
  define_method(req) do |path, options={}, &block|
    self.class.send(req, path, options, &block)
  end
end