class Fog::Storage::OpenStack::Mock
Public Class Methods
data()
click to toggle source
# File lib/fog/openstack/storage.rb, line 42 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end
new(options={})
click to toggle source
# File lib/fog/openstack/storage.rb, line 52 def initialize(options={}) @openstack_api_key = options[:openstack_api_key] @openstack_username = options[:openstack_username] @path = '/v1/AUTH_1234' end
reset()
click to toggle source
# File lib/fog/openstack/storage.rb, line 48 def self.reset @data = nil end
Public Instance Methods
change_account(account)
click to toggle source
# File lib/fog/openstack/storage.rb, line 66 def change_account(account) @original_path ||= @path version_string = @original_path.split('/')[1] @path = "/#{version_string}/#{account}" end
data()
click to toggle source
# File lib/fog/openstack/storage.rb, line 58 def data self.class.data[@openstack_username] end
reset_account_name()
click to toggle source
# File lib/fog/openstack/storage.rb, line 72 def reset_account_name @path = @original_path end
reset_data()
click to toggle source
# File lib/fog/openstack/storage.rb, line 62 def reset_data self.class.data.delete(@openstack_username) end