Class: Pipet::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/pipet/cli.rb,
lib/pipet/tasks/list.rb,
lib/pipet/tasks/pull.rb

Instance Method Summary collapse

Instance Method Details

#listObject



6
7
8
9
10
11
12
13
# File 'lib/pipet/tasks/list.rb', line 6

def list
  databases = Database.all

  databases.each do |db|
    puts "#{db.name}"
  end

end

#pull(name) ⇒ Object



6
7
8
9
# File 'lib/pipet/tasks/pull.rb', line 6

def pull(name)
  match = Database.all.keep_if { |x| x.name == name }.first
  match.pull
end