4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/misty/openstack/extension.rb', line 4
def api
@api_fusion ||= begin
list = super
api_ext.each do |key, value|
if list.include?(key)
target = list[key]
value.each do |verb, methods|
if target.has_key?(verb)
methods.each do |method|
raise RuntimeError, "#{key} => #{verb} already includes: #{method}" if target[verb].include?(method)
target[verb] << method
end
else
target.merge!(verb => methods)
end
end
else
list.merge!(key => value)
end
end
list
end
@api_fusion
end
|