Class: Tapsoob::Config
- Inherits:
-
Object
- Object
- Tapsoob::Config
- Defined in:
- lib/tapsoob/config.rb
Class Attribute Summary collapse
-
.chunksize ⇒ Object
Returns the value of attribute chunksize.
-
.database_url ⇒ Object
Returns the value of attribute database_url.
-
.dump_path ⇒ Object
Returns the value of attribute dump_path.
-
.login ⇒ Object
Returns the value of attribute login.
-
.password ⇒ Object
Returns the value of attribute password.
-
.tapsoob_database_url ⇒ Object
Returns the value of attribute tapsoob_database_url.
Class Method Summary collapse
Class Attribute Details
.chunksize ⇒ Object
Returns the value of attribute chunksize.
20 21 22 |
# File 'lib/tapsoob/config.rb', line 20 def chunksize @chunksize end |
.database_url ⇒ Object
Returns the value of attribute database_url.
19 20 21 |
# File 'lib/tapsoob/config.rb', line 19 def database_url @database_url end |
.dump_path ⇒ Object
Returns the value of attribute dump_path.
19 20 21 |
# File 'lib/tapsoob/config.rb', line 19 def dump_path @dump_path end |
.login ⇒ Object
Returns the value of attribute login.
19 20 21 |
# File 'lib/tapsoob/config.rb', line 19 def login @login end |
.password ⇒ Object
Returns the value of attribute password.
19 20 21 |
# File 'lib/tapsoob/config.rb', line 19 def password @password end |
.tapsoob_database_url ⇒ Object
Returns the value of attribute tapsoob_database_url.
18 19 20 |
# File 'lib/tapsoob/config.rb', line 18 def tapsoob_database_url @tapsoob_database_url end |
Class Method Details
.verify_database_url(db_url = nil) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/tapsoob/config.rb', line 22 def verify_database_url(db_url=nil) db_url ||= self.database_url db = Sequel.connect(db_url) db.tables db.disconnect rescue Object => e puts "Failed to connect to database:\n #{e.class} -> #{e}" exit 1 end |