Prints the class options per group. If an option
does not belong to any group, it’s printed as Class option.
# File lib/bundler/vendor/thor/lib/thor/base.rb, line 515
def class_options_help(shell, groups = {}) #:nodoc:
# Group options by group
class_options.each do |_, value|
groups[value.group] ||= []
groups[value.group] << value
end
# Deal with default group
global_options = groups.delete(nil) || []
print_options(shell, global_options)
# Print all others
groups.each do |group_name, options|
print_options(shell, options, group_name)
end
end