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

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Base.



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

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

  replace(data)
end

Class Method Details

.base_urlObject



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

def self.base_url
  @base_url
end

.base_url=(url) ⇒ Object



45
46
47
# File 'lib/fog/compute/ecloud.rb', line 45

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

Instance Method Details

#_parentObject



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

def _parent
  @parent
end

#base_urlObject



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

def base_url
  Base.base_url
end

#firstObject



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

def first
  raise "Don't do this"
end

#hrefObject



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

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

#inspectObject



81
82
83
# File 'lib/fog/compute/ecloud.rb', line 81

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

#lastObject



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

def last
  raise "Don't do this"
end