Class: Dip::Commands::List
- Inherits:
-
Dip::Command
- Object
- Dip::Command
- Dip::Commands::List
- Defined in:
- lib/dip/commands/list.rb
Instance Method Summary collapse
Methods inherited from Dip::Command
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/dip/commands/list.rb', line 9 def execute tree = InteractionTree.new(Dip.config.interaction).list longest_name = tree.keys.map(&:size).max tree.each do |name, command| puts "#{name.ljust(longest_name)} ##{command[:description] ? " #{command[:description]}" : ""}" end end |