mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
fix adding collection helpers to bins
This commit is contained in:
parent
31661e0294
commit
7e67e4aec5
1 changed files with 7 additions and 5 deletions
|
@ -42,11 +42,13 @@ module Fog
|
|||
if availability
|
||||
for service in services
|
||||
for collection in self[service].collections
|
||||
self.class_eval <<-EOS, __FILE__, __LINE__
|
||||
def #{collection}
|
||||
self[:#{service}].#{collection}
|
||||
end
|
||||
EOS
|
||||
unless self.respond_to?(collection)
|
||||
self.class_eval <<-EOS, __FILE__, __LINE__
|
||||
def self.#{collection}
|
||||
self[:#{service}].#{collection}
|
||||
end
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue