Sha256: ba188b3c7d8d839588b13576e6ffacb997a207f2be662dc88343c6876650ea53
Contents?: true
Size: 650 Bytes
Versions: 9
Compression:
Stored size: 650 Bytes
Contents
require "thor" module <%= project_class_name %> class Main < Command class_option :verbose, type: :boolean class_option :noop, type: :boolean desc "hello NAME", "say hello to NAME" long_desc Help.text(:hello) option :from, desc: "from person" def hello(name="you") puts "from: #{options[:from]}" if options[:from] puts "Hello #{name}" end desc "completions *PARAMS", "prints words for auto-completion" long_desc Help.text(:completions) def completions(*params) Completer.new(*params).run end desc "version", "prints version" def version puts VERSION end end end
Version data entries
9 entries across 9 versions & 1 rubygems