Parent

Class/Module Index [+]

Quicksearch

Fog::Storage::OpenStack::Mock

Public Class Methods

data() click to toggle source
# File lib/fog/openstack/storage.rb, line 37
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 47
def initialize(options={})
  require 'mime/types'
  @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 43
def self.reset
  @data = nil
end

Public Instance Methods

change_account(account) click to toggle source
# File lib/fog/openstack/storage.rb, line 62
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 54
def data
  self.class.data[@openstack_username]
end
reset_account_name() click to toggle source
# File lib/fog/openstack/storage.rb, line 68
def reset_account_name
  @path = @original_path
end
reset_data() click to toggle source
# File lib/fog/openstack/storage.rb, line 58
def reset_data
  self.class.data.delete(@openstack_username)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.