Class: B2::Base

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

Direct Known Subclasses

Bucket, File

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



12
13
14
15
# File 'lib/b2/base.rb', line 12

def initialize
  B2::Authentication.authorize if B2::Base.base_uri.nil? || (B2::Base.cookies[:expired] < Time.now)
  @download_url = B2::Base.cookies[:download_url]
end

Instance Attribute Details

#download_urlObject

Returns the value of attribute download_url.



4
5
6
# File 'lib/b2/base.rb', line 4

def download_url
  @download_url
end