1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

make remove_method not needed in collection

This commit is contained in:
geemus 2010-11-04 13:51:41 -07:00
parent 2faeb37b00
commit f54546f16f

View file

@ -5,19 +5,20 @@ module Fog
include Fog::Attributes::InstanceMethods
Array.public_instance_methods(false).each do |method|
class_eval <<-RUBY
def #{method}(*args)
unless @loaded
lazy_load
unless [:reject, :select].include?(method.to_sym)
class_eval <<-RUBY
def #{method}(*args)
unless @loaded
lazy_load
end
super
end
super
end
RUBY
RUBY
end
end
%w[reject select].each do |method|
class_eval <<-RUBY
# remove_method :#{method}
def #{method}(*args)
unless @loaded
lazy_load