Sha256: 1072c3cf5f04dbc0a66c81bc688e68f944aefbd9145194fe30e977b146c8fd94

Contents?: true

Size: 448 Bytes

Versions: 5

Compression:

Stored size: 448 Bytes

Contents

require_relative '../../commando'

module Commando
  module Action
    # Action that prints out all available commands
    module Help
      def self.perform(args:, output: $stdout)
        output.puts "Valid commands are"
        descriptions = Commando.config.descriptions
        descriptions.sort_by { |cmd, _| cmd }.each do |command, description|
          output.puts "  * #{command} - #{description}"
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tcollier-commando-1.0.0 lib/commando/action/help.rb
tcollier-commando-0.2.1 lib/commando/action/help.rb
tcollier-commando-0.2.0 lib/commando/action/help.rb
tcollier-commando-0.1.2 lib/commando/action/help.rb
tcollier-commando-0.1.1 lib/commando/action/help.rb