Class: Application::Base
- Inherits:
-
Object
- Object
- Application::Base
- Defined in:
- lib/capistrano-db-pull/application.rb
Instance Attribute Summary collapse
-
#capistrano ⇒ Object
Returns the value of attribute capistrano.
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
- #adapter ⇒ Object
- #database ⇒ Object
-
#initialize(instance) ⇒ Base
constructor
A new instance of Base.
- #mysql? ⇒ Boolean
- #postgresql? ⇒ Boolean
- #sqlite3? ⇒ Boolean
Constructor Details
#initialize(instance) ⇒ Base
Returns a new instance of Base.
5 6 7 |
# File 'lib/capistrano-db-pull/application.rb', line 5 def initialize(instance) @capistrano = instance end |
Instance Attribute Details
#capistrano ⇒ Object
Returns the value of attribute capistrano.
3 4 5 |
# File 'lib/capistrano-db-pull/application.rb', line 3 def capistrano @capistrano end |
#config ⇒ Object
Returns the value of attribute config.
3 4 5 |
# File 'lib/capistrano-db-pull/application.rb', line 3 def config @config end |
Instance Method Details
#adapter ⇒ Object
21 22 23 |
# File 'lib/capistrano-db-pull/application.rb', line 21 def adapter @config['adapter'].downcase end |
#database ⇒ Object
25 26 27 |
# File 'lib/capistrano-db-pull/application.rb', line 25 def database @config['database'] end |
#mysql? ⇒ Boolean
17 18 19 |
# File 'lib/capistrano-db-pull/application.rb', line 17 def mysql? adapter == 'mysql2' || adapter == 'mysql' end |
#postgresql? ⇒ Boolean
9 10 11 |
# File 'lib/capistrano-db-pull/application.rb', line 9 def postgresql? adapter == 'pg' || adapter == 'postgresql' end |
#sqlite3? ⇒ Boolean
13 14 15 |
# File 'lib/capistrano-db-pull/application.rb', line 13 def sqlite3? adapter == 'sqlite3' end |