Class: CPRuntime::MySql2Client
- Inherits:
-
Object
- Object
- CPRuntime::MySql2Client
- Includes:
- CPRuntime
- Defined in:
- lib/cpruntime/MySql2Client.rb,
lib/cpruntime/MySql2Client.rb
Instance Method Summary collapse
Methods included from CPRuntime
Instance Method Details
#create_from_svc(hostname) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/cpruntime/MySql2Client.rb', line 11 def create_from_svc(hostname) m = credential_map("mysql") c = m[hostname] p c client = Mysql2::Client.new(:host => c.host,:username => c.username,:password=>c.password,:database=>c.db,:port=>c.port) end |