Class: MobyUtil::DBConnection

Inherits:
Object
  • Object
show all
Defined in:
lib/tdriver/util/database/connection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(db_type, host, database_name, username, password) ⇒ DBConnection

description

Initialize connection object



29
30
31
32
33
34
35
36
# File 'lib/tdriver/util/database/connection.rb', line 29

def initialize( db_type, host, database_name, username, password )
  @db_type = db_type.to_s.downcase
  @host = host.to_s.downcase
  @database_name = database_name
  @username = username
  @password = password
  @dbh = nil   
end

Instance Attribute Details

#database_nameObject

Returns the value of attribute database_name.



24
25
26
# File 'lib/tdriver/util/database/connection.rb', line 24

def database_name
  @database_name
end

#db_typeObject

Returns the value of attribute db_type.



24
25
26
# File 'lib/tdriver/util/database/connection.rb', line 24

def db_type
  @db_type
end

#dbhObject

Returns the value of attribute dbh.



24
25
26
# File 'lib/tdriver/util/database/connection.rb', line 24

def dbh
  @dbh
end

#hostObject

Returns the value of attribute host.



24
25
26
# File 'lib/tdriver/util/database/connection.rb', line 24

def host
  @host
end

#passwordObject

Returns the value of attribute password.



24
25
26
# File 'lib/tdriver/util/database/connection.rb', line 24

def password
  @password
end

#usernameObject

Returns the value of attribute username.



24
25
26
# File 'lib/tdriver/util/database/connection.rb', line 24

def username
  @username
end