Class: Txdb::ConnectionString
- Inherits:
-
Object
- Object
- Txdb::ConnectionString
- Defined in:
- lib/txdb/connection_string.rb
Constant Summary collapse
- TEMPLATES =
{ mysql2: "%{adapter}://%{username}:%{password}@%{host}:%{port}/%{name}", sqlite: "%{adapter}://%{name}" }
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ConnectionString
constructor
A new instance of ConnectionString.
- #string ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ ConnectionString
Returns a new instance of ConnectionString.
10 11 12 |
# File 'lib/txdb/connection_string.rb', line 10 def initialize( = {}) @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/txdb/connection_string.rb', line 8 def @options end |
Instance Method Details
#string ⇒ Object
14 15 16 |
# File 'lib/txdb/connection_string.rb', line 14 def string TEMPLATES[[:adapter].to_sym] % end |