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

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}, parent = nil) ⇒ Base

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

.base_urlObject



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

def self.base_url
  @base_url
end

.base_url=(url) ⇒ Object



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

#_parentObject



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

def _parent
  @parent
end

#base_urlObject



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

def base_url
  Base.base_url
end

#firstObject



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

def first
  raise "Don't do this"
end

#hrefObject



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

#inspectObject



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

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

#lastObject



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

def last
  raise "Don't do this"
end