Class: DbVcs::Adapters::Mysql::Config

Inherits:
Object
  • Object
show all
Includes:
ConfigAttributes
Defined in:
lib/db_vcs/adapters/mysql.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ConfigAttributes

#assign_attributes

Constructor Details

#initializeConfig

Returns a new instance of Config.



15
16
17
18
19
20
21
22
# File 'lib/db_vcs/adapters/mysql.rb', line 15

def initialize
  @host = "127.0.0.1"
  @port = "3306"
  @username = "root"
  @password = nil
  @mysqldump_path = DbVcs::Utils.resolve_exec_path("mysqldump")
  @mysql_path = DbVcs::Utils.resolve_exec_path("mysql")
end

Instance Attribute Details

#hostObject

Returns the value of attribute host.



9
10
11
# File 'lib/db_vcs/adapters/mysql.rb', line 9

def host
  @host
end

#mysql_pathObject

Path to mysql util. It is resolved automatically.



13
14
15
# File 'lib/db_vcs/adapters/mysql.rb', line 13

def mysql_path
  @mysql_path
end

#mysqldump_pathObject

Path to mysqldump util. It is resolved automatically.



11
12
13
# File 'lib/db_vcs/adapters/mysql.rb', line 11

def mysqldump_path
  @mysqldump_path
end

#passwordObject

Returns the value of attribute password.



9
10
11
# File 'lib/db_vcs/adapters/mysql.rb', line 9

def password
  @password
end

#portObject

Returns the value of attribute port.



9
10
11
# File 'lib/db_vcs/adapters/mysql.rb', line 9

def port
  @port
end

#usernameObject

Returns the value of attribute username.



9
10
11
# File 'lib/db_vcs/adapters/mysql.rb', line 9

def username
  @username
end