Method: Charyf::Command.sorted_groups
- Defined in:
- lib/charyf/utils/command.rb
.sorted_groups ⇒ Object
:nodoc:
| 71 72 73 74 75 76 77 78 79 80 | # File 'lib/charyf/utils/command.rb', line 71 def sorted_groups # :nodoc: groups = (subclasses - hidden_commands).group_by {|c| c.namespace.split(":").first} groups.keys.each do |key| groups[key] = groups[key].flat_map(&:printing_commands).sort end charyf = groups.delete('charyf') [['charyf', charyf]] + groups.sort.to_a end |