Sha256: 63a5e2359ada9334935fdba41b13c10d21e12aa15cf29630d22654cae4cc0889
Contents?: true
Size: 552 Bytes
Versions: 1
Compression:
Stored size: 552 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.action do |global_opts, opts, args| @program.help 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rcoli-0.5.0 | lib/rcoli.rb |