Class: MobyUtil::DBConnection
- Defined in:
- lib/tdriver/util/database/connection.rb
Instance Attribute Summary collapse
-
#database_name ⇒ Object
Returns the value of attribute database_name.
-
#db_type ⇒ Object
Returns the value of attribute db_type.
-
#dbh ⇒ Object
Returns the value of attribute dbh.
-
#host ⇒ Object
Returns the value of attribute host.
-
#password ⇒ Object
Returns the value of attribute password.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(db_type, host, database_name, username, password) ⇒ DBConnection
constructor
description Initialize connection object.
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_name ⇒ Object
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_type ⇒ Object
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 |
#dbh ⇒ Object
Returns the value of attribute dbh.
24 25 26 |
# File 'lib/tdriver/util/database/connection.rb', line 24 def dbh @dbh end |
#host ⇒ Object
Returns the value of attribute host.
24 25 26 |
# File 'lib/tdriver/util/database/connection.rb', line 24 def host @host end |
#password ⇒ Object
Returns the value of attribute password.
24 25 26 |
# File 'lib/tdriver/util/database/connection.rb', line 24 def password @password end |
#username ⇒ Object
Returns the value of attribute username.
24 25 26 |
# File 'lib/tdriver/util/database/connection.rb', line 24 def username @username end |