Sha256: 9956a3faedc9c05e8c02e8de6ceb28bae116e1ff65ca75ba32d343dbac073720

Contents?: true

Size: 600 Bytes

Versions: 4

Compression:

Stored size: 600 Bytes

Contents

module Noe
  class Main
    # 
    # Show help about a specific command
    #
    # SYNOPSIS
    #   #{program_name} #{command_name} COMMAND
    #
    class Help < Quickl::Command(__FILE__, __LINE__)
      
      # Let NoSuchCommandError be passed to higher stage
      no_react_to Quickl::NoSuchCommand
      
      # Command execution
      def execute(args)
        if args.size != 1
          puts super_command.help
        else
          cmd = has_command!(args.first, super_command)
          puts cmd.help
        end
      end
      
    end # class Help
  end # class Main
end # module Noe

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
noe-1.3.0 lib/noe/help.rb
noe-1.2.0 ./lib/noe/help.rb
noe-1.1.0 ./lib/noe/help.rb
noe-1.0.0 lib/noe/help.rb