about summary refs log tree commit diff
path: root/app/lib/command_tag/commands.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/command_tag/commands.rb')
-rw-r--r--app/lib/command_tag/commands.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/lib/command_tag/commands.rb b/app/lib/command_tag/commands.rb
new file mode 100644
index 000000000..068c8bb66
--- /dev/null
+++ b/app/lib/command_tag/commands.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+module CommandTag::Commands
+  def self.included(base)
+    Dir[File.join(__dir__, 'commands', '*.rb')].sort.each do |file|
+      require file
+      base.include(CommandTag::Commands.const_get(File.basename(file).gsub('.rb', '').split('_').map(&:capitalize).join))
+    end
+  end
+end