Class: Boar::Providers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/boar/providers/base.rb

Direct Known Subclasses

BoxNet, Dropbox, GoogleDrive, SkyDrive

Instance Method Summary collapse

Instance Method Details

#get_credentials(_, _, _) ⇒ Object



14
15
16
# File 'lib/boar/providers/base.rb', line 14

def get_credentials(_, _, _)
  raise Boar::Exceptions::UnImplemented
end

#redirect_for_authentication(_, _) ⇒ Object



10
11
12
# File 'lib/boar/providers/base.rb', line 10

def redirect_for_authentication(_, _)
  raise Boar::Exceptions::UnImplemented
end

#search_file(_, _) ⇒ Object



23
24
25
# File 'lib/boar/providers/base.rb', line 23

def search_file(_, _)
  false
end

#update_credentials(credentials, params) ⇒ Object



18
19
20
21
# File 'lib/boar/providers/base.rb', line 18

def update_credentials(credentials, params)
  params[:all][params[:host]][params[:name]] = params[:single].merge(credentials).to_hash
  open(params[:path], "w") {|f| f.write(params[:all].to_yaml) }
end