Skip to content

Commit

Permalink
Copy edit the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed May 11, 2023
1 parent e5031d2 commit 60abf76
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions lib/thor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -496,22 +496,13 @@ def help(command = nil, subcommand = true); super; end
end
alias_method :subtask_help, :subcommand_help

# Sort the commands, lexicographically by default
# Sort the commands, lexicographically by default.
#
# Can be overridden in the subclass to change the display order of the
# commands, for example defining
#
# def self.sort_commands!(list)
# list.sort_by! do |a,b|
# a[0] == :help ? -1 : a[0] <=> b[0]
# end
# end
#
# will put the +help+ command at the top
# commands.
def sort_commands!(list)
defined?(super) ? super(list) : list.sort! { |a, b| a[0] <=> b[0] }
end

end

include Thor::Base
Expand Down

0 comments on commit 60abf76

Please sign in to comment.