Sha256: 947fa1764ebf7e40c58bf812a56e7a50d89eaeced7df2cdcd175aa92dc5e3302
Contents?: true
Size: 827 Bytes
Versions: 12
Compression:
Stored size: 827 Bytes
Contents
class Cello::Commands::Main class << self def run(args=ARGV) cmd = args.shift case cmd when "-h", "--help", NilClass Cello::Commands::Help.run exit 0 when "-v", "--version", "version" Cello::Commands::Version.run exit 0 when "-np", "--new-project", "newproject" Cello::Commands::NewProject.run exit 0 when "-nP", "--new-page", "newpage" Cello::Commands::NewPage.run exit 0 when "-d", "--debug", "debug" Cello::Commands::Debug.run exit 0 end unless system("cello #{cmd}", *args) if $?.exitstatus == 127 # bash 'command not found' puts "Unknown subcommand #{cmd.inspect}" Cello::Commands::Help.run exit 127 end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems