Skip to content

Instantly share code, notes, and snippets.

@erubboli
Created September 7, 2010 09:28
Show Gist options
  • Save erubboli/568076 to your computer and use it in GitHub Desktop.
Save erubboli/568076 to your computer and use it in GitHub Desktop.
class Base
def self.mysql_connector(config)
#...
end
def self.oracle_connector(config)
#...
end
end
adapter = "mysql"
method_name = "#{adapter}_connection"
Base.send(method_name, config)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment