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

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Base.



59
60
61
62
63
# File 'lib/fog/ecloud/compute.rb', line 59

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

  replace(data)
end

Class Method Details

.base_urlObject



47
48
49
# File 'lib/fog/ecloud/compute.rb', line 47

def self.base_url
  @base_url
end

.base_url=(url) ⇒ Object



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

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

Instance Method Details

#_parentObject



65
66
67
# File 'lib/fog/ecloud/compute.rb', line 65

def _parent
  @parent
end

#base_urlObject



69
70
71
# File 'lib/fog/ecloud/compute.rb', line 69

def base_url
  Base.base_url
end

#firstObject



51
52
53
# File 'lib/fog/ecloud/compute.rb', line 51

def first
  raise "Don't do this"
end

#hrefObject



73
74
75
# File 'lib/fog/ecloud/compute.rb', line 73

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

#inspectObject



77
78
79
# File 'lib/fog/ecloud/compute.rb', line 77

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

#lastObject



55
56
57
# File 'lib/fog/ecloud/compute.rb', line 55

def last
  raise "Don't do this"
end