From a0cfe5f9d83915258e499c71dfcd867b358fbefc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ty=C3=A1s=20Somfai?= Date: Mon, 6 Nov 2017 16:25:50 +0100 Subject: [PATCH] sort commands (#238) * sort commands * code style fix --- lib/moonshot/command_line.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/moonshot/command_line.rb b/lib/moonshot/command_line.rb index e31533ff..384161c2 100644 --- a/lib/moonshot/command_line.rb +++ b/lib/moonshot/command_line.rb @@ -111,6 +111,8 @@ def load_commands command_name = commandify(klass) @commands[command_name] = klass end + + @commands = @commands.sort_by { |k, _v| k.to_s }.to_h end def commandify(klass)