Class: Couchup::Commands::Use
- Inherits:
-
Object
- Object
- Couchup::Commands::Use
- Defined in:
- lib/couchup/commands/use.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.describe ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/couchup/commands/use.rb', line 16 def self.describe { :description => "Use provided database", :detail => "use <database>", :examples => ["use 'riders'"] } end |
Instance Method Details
#run(database) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/couchup/commands/use.rb', line 4 def run(database) db = database.to_s if Couchup.databases.include? db Couchup.database = db info = Couchup.database.info ap info info else ap "Database was not found" end end |