class Cl::Help::Usage
Public Instance Methods
executable()
click to toggle source
# File lib/cl/help/usage.rb, line 17 def executable ctx.name end
format()
click to toggle source
# File lib/cl/help/usage.rb, line 4 def format cmd.registry_keys.map do |key| line(key) end end
line(key)
click to toggle source
# File lib/cl/help/usage.rb, line 10 def line(key) usage = [executable, key.to_s.gsub(':', ' ')] usage += cmd.args.map(&:to_s) # { |arg| "[#{arg}]" } usage << '[options]' if opts? usage.join(' ') end
opts?()
click to toggle source
# File lib/cl/help/usage.rb, line 21 def opts? cmd.opts.any? end