Class: Connectator::DB2::Connection
- Inherits:
-
Base::Connection
- Object
- Base::Connection
- Connectator::DB2::Connection
- Includes:
- UsingDBIProxy
- Defined in:
- lib/connectator/db2/connection.rb
Instance Attribute Summary
Attributes inherited from Base::Connection
Instance Method Summary collapse
- #connection_string ⇒ Object
-
#initialize(opts = {}) ⇒ Connection
constructor
A new instance of Connection.
Methods inherited from Base::Connection
#connection_params, #method_missing, #ping?, #valid?, #valid_system_connection?
Constructor Details
#initialize(opts = {}) ⇒ Connection
Returns a new instance of Connection.
6 7 8 9 10 11 |
# File 'lib/connectator/db2/connection.rb', line 6 def initialize(opts = {}) super(opts) connection_params.driver = 'DB2' connection_params.protocol = 'TCPIP' connection_params.database = opts[:database] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Connectator::Base::Connection
Instance Method Details
#connection_string ⇒ Object
13 14 15 |
# File 'lib/connectator/db2/connection.rb', line 13 def connection_string "DBI:ODBC:#{connection_params_list}" end |