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
1 changed files with 9 additions and 8 deletions

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