Sha256: ba845c6bfdbdb5b856ab23c92e53b0bccf2c4d67a42f3d248fdcbe6228465be7
Contents?: true
Size: 573 Bytes
Versions: 2
Compression:
Stored size: 573 Bytes
Contents
require 'highline/import' require 'rcoli/extensions' require 'rcoli/help' require 'rcoli/model' @program = RCoLi::Program.new def application(id, &block) @program.name id @program.command(:help) do |c| c.description "Display help documentation" c.solitaire c.action do |global_opts, opts, args| @program.help args end end @program.instance_eval &block end at_exit { begin @program.execute(ARGV, self) rescue InvalidCommand => e say "#{@program.value_of_name}: #{e.message}. See '#{@program.value_of_name} --help'" end }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rcoli-0.5.4 | lib/rcoli.rb |
rcoli-0.5.3 | lib/rcoli.rb |