Class: Connectator::Sybase::Connection
- Inherits:
-
Base::Connection
- Object
- Base::Connection
- Connectator::Sybase::Connection
- Includes:
- UsingDBIProxy
- Defined in:
- lib/connectator/sybase/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/sybase/connection.rb', line 6 def initialize(opts = {}) connection_params.driver = 'FreeTDS' connection_params.tds_version = opts[:tds_version] || '5.0' connection_params.database = opts[:database] || 'master' super(opts) 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/sybase/connection.rb', line 13 def connection_string "DBI:ODBC:#{connection_params_list}" end |