master/lib/guard/cli.rb
Thibaud Guillaume-Gentil 4d3744ff43 Initial commit
2010-10-03 23:00:33 +02:00

20 lines
504 B
Ruby

require 'thor'
require 'guard/version'
module Guard
class CLI < Thor
default_task :start
desc "start", "Starts guard"
method_option :clear, :type => :boolean, :default => false, :aliases => '-c', :banner => "Auto clear shell after each change"
def start
Guard.start(options)
end
desc "version", "Prints the guard's version information"
def version
Guard::UI.info "Guard version #{Guard::VERSION}"
end
map %w(-v --version) => :version
end
end