Class: Fog::Ecloud::MockDataClasses::Base

Inherits:
Hash
  • Object
show all
Defined in:
lib/fog/ecloud/mock_data_classes.rb

Direct Known Subclasses

MockBackupInternetService, MockCatalog, MockCatalogItem, MockCatalogItemCustomization, MockCatalogItemVappTemplate, MockData, MockFirewallAcls, MockNetwork, MockNetworkExtensions, MockNetworkIp, MockNetworkIps, MockOrganization, MockPublicIp, MockPublicIpInternetService, MockPublicIpInternetServiceNode, MockPublicIpInternetServiceNodes, MockPublicIpInternetServices, MockPublicIps, MockTaskList, MockVdc, MockVdcInternetServices, MockVersion, MockVirtualMachine, MockVirtualMachineDisk

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Hash

#symbolize_keys!

Constructor Details

- (Base) initialize(data = {}, parent = nil)

Returns a new instance of Base



23
24
25
26
27
# File 'lib/fog/ecloud/mock_data_classes.rb', line 23

def initialize(data = {}, parent = nil)
  @parent = parent

  replace(data)
end

Class Method Details

+ (Object) base_url



11
12
13
# File 'lib/fog/ecloud/mock_data_classes.rb', line 11

def self.base_url
  @base_url
end

+ (Object) base_url=(url)



5
6
7
# File 'lib/fog/ecloud/mock_data_classes.rb', line 5

def self.base_url=(url)
  @base_url = url
end

Instance Method Details

- (Object) _parent



29
30
31
# File 'lib/fog/ecloud/mock_data_classes.rb', line 29

def _parent
  @parent
end

- (Object) base_url



33
34
35
# File 'lib/fog/ecloud/mock_data_classes.rb', line 33

def base_url
  Base.base_url
end

- (Object) first



15
16
17
# File 'lib/fog/ecloud/mock_data_classes.rb', line 15

def first
  raise "Don't do this"
end

- (Object) href



37
38
39
# File 'lib/fog/ecloud/mock_data_classes.rb', line 37

def href
  [base_url, self.class.name.split("::").last, object_id].join("/")
end

- (Object) inspect



41
42
43
# File 'lib/fog/ecloud/mock_data_classes.rb', line 41

def inspect
  "<#{self.class.name} #{object_id} data=#{super}>"
end

- (Object) last



19
20
21
# File 'lib/fog/ecloud/mock_data_classes.rb', line 19

def last
  raise "Don't do this"
end