Method: Mysql#initialize
- Defined in:
- lib/cryo/database/mysql.rb
#initialize(opts = {}) ⇒ Mysql
Returns a new instance of Mysql.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/cryo/database/mysql.rb', line 8 def initialize(opts={}) raise "you need to specify a password" unless opts[:password] self.password = opts[:password] raise "you need to specify a host" unless opts[:host] self.host = opts[:host] raise "you need to specify a tmp path" unless opts[:tmp_path] self.tmp_path = opts[:tmp_path] self.user = opts[:user] || 'ubuntu' self.port = opts[:port] || '3306' self.local_path = opts[:local_path] || get_tempfile verify_system_dependency 'mysqldump' end |