Class: Fog::Storage::Google
- Inherits:
-
Fog::Service
- Object
- Fog::Service
- Fog::Storage::Google
- Defined in:
- lib/fog/storage/google.rb
Class Method Summary collapse
Class Method Details
.new(options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/fog/storage/google.rb', line 4 def self.new( = {}) begin fog_creds = Fog.credentials rescue fog_creds = nil end if .keys.include?(:google_storage_access_key_id) || (!fog_creds.nil? && fog_creds.keys.include?(:google_storage_access_key_id)) Fog::Storage::GoogleXML.new() else Fog::Storage::GoogleJSON.new() end end |