fog / fog-xenserver

Module for the 'fog' gem to support XENSERVER
MIT License
16 stars 22 forks source link

Add messages to Pool model #33

Closed fernandes closed 9 years ago

fernandes commented 9 years ago

On ruby 1.9.3+ we can go this way:

def request_without_reference(*args)
  service.send("#{__callee__}_#{provider_class.downcase}", *args)
end
alias_method :method1, :request_without_reference
alias_method :method2, :request_without_reference
alias_method :method3, :request_without_reference

Last information, kept on pool.rb because an object like vm has no need on calling requests without reference as first parameter, this will be used on others objects (like host), but I opted to keep on each object so don't need to change fog structure and each object can define its own request call.