Class: Database::Remote
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(instance, stage) ⇒ Remote
constructor
A new instance of Remote.
Methods inherited from Base
#adapter, #postgresql?, #sqlite3?
Constructor Details
#initialize(instance, stage) ⇒ Remote
Returns a new instance of Remote.
23 24 25 26 27 28 |
# File 'lib/capistrano/db/database.rb', line 23 def initialize(instance, stage) super(instance) config = @capistrano.capture( "cat #{@capstrano.current_path}/config/database.yml") @config = YAML.load(ERB.new(config).result)[stage.to_s] end |