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:
parent
2faeb37b00
commit
f54546f16f
1 changed files with 9 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue