bin/quickl in quickl-0.2.1 vs bin/quickl in quickl-0.2.2

- old
+ new

@@ -32,30 +32,48 @@ } # Name of the command to generate attr_reader :cmd_name + # Generate require header + attr_reader :header + + # Generate require footer + attr_reader :footer + # Creates a command instance def initialize @layout = :single @gen_options = [:help, :version] end # Install options options do |opt| - opt.on("--layout=LAYOUT", [:single], - "Select specific command layout (single)") do |l| + opt.on("--layout=LAYOUT", [:single, :delegator], + "Select specific command layout (single,delegator)") do |l| @layout = l end opt.on('--options x,y,z', Array, "Automatically generate options for... (#{OPTION_HELPERS.keys.join(', ')})") do |list| @gen_options = list.collect{|s| s.to_sym} unless (unknown = @gen_options.reject{|s| OPTION_HELPERS.has_key?(s)}).empty? raise Quickl::InvalidOption, "Unknown option helpers: #{unknown.join(',')}" end end + + @header = true + opt.on('--[no-]header', + "Generate header (require rubygems + quickl)"){|value| + @header = value + } + + @footer = true + opt.on('--[no-]footer', + "Generate footer (command execution)"){|value| + @footer = value + } # Show the help and exit opt.on_tail("--help", "Show help") do raise Quickl::Help end