Sha256: 4a9fee6daf91fcbe61afbcefbc26a4e3c9de5e2a4d479e83e5a72a08f1b1009b
Contents?: true
Size: 1.06 KB
Versions: 17
Compression:
Stored size: 1.06 KB
Contents
module Foobara class CommandConnector module Commands class ListCommands < Command inputs request: :duck, # TODO: have some way to specify by Ruby class... verbose: :boolean result [ [ :string, { type: :string, allow_nil: true } ] ] def execute build_list build_result end attr_accessor :list def build_list self.list = command_connector.command_registry.all_transformed_command_classes end def verbose? verbose end def build_result if verbose? list.map do |command_class| [command_class.full_command_name, command_class.description] end else list.map do |command_class| [command_class.full_command_name, nil] end end end def command_connector request.command_connector end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems