Class: Fog::Vcloud::MockDataClasses::Base

Inherits:
Hash
  • Object
show all
Defined in:
lib/fog/vcloud/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.



31
32
33
34
35
# File 'lib/fog/vcloud/mock_data_classes.rb', line 31

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

  replace(data)
end

Class Method Details

.base_urlObject



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

def self.base_url
  @base_url
end

.base_url=(url) ⇒ Object



13
14
15
# File 'lib/fog/vcloud/mock_data_classes.rb', line 13

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

Instance Method Details

#_parentObject



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

def _parent
  @parent
end

#base_urlObject



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

def base_url
  Base.base_url
end

#firstObject



23
24
25
# File 'lib/fog/vcloud/mock_data_classes.rb', line 23

def first
  raise "Don't do this"
end

#hrefObject



45
46
47
# File 'lib/fog/vcloud/mock_data_classes.rb', line 45

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

#inspectObject



49
50
51
# File 'lib/fog/vcloud/mock_data_classes.rb', line 49

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

#lastObject



27
28
29
# File 'lib/fog/vcloud/mock_data_classes.rb', line 27

def last
  raise "Don't do this"
end