lib/termup/cli.rb in termup-1.1.0 vs lib/termup/cli.rb in termup-1.2.0

- old
+ new

@@ -27,22 +27,24 @@ def edit(project) create(project) unless File.exists?(path(project)) say "please set $EDITOR in your .bash_profile." and return unless editor = ENV['EDITOR'] system("#{editor} #{path(project)}") end - + desc "list", "List termup projects (Shortcut: l)" def list projects = Dir["#{TERMUP_DIR}/*.yml"].map{|file| File.basename(file,'.yml') } say "Your projects: #{projects.join(', ')}" end - + desc "start PROJECT", "Start termup project (Shortcut: s)" def start(project) + say "project \"#{project}\" doesn't exist!" and return unless File.exists?(path(project)) Termup::Base.new(project) end + + protected - protected def path(project) "#{TERMUP_DIR}/#{project}.yml" end end end