about summary refs log tree commit diff
path: root/app/lib/command_tag/commands.rb
blob: f274864276e4aa8eeb40a2306c0330979a7c03a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

Dir[File.join(__dir__, 'command', '*.rb')].sort.each { |file| require file }

module CommandTag::Commands
  def self.included(base)
    CommandTag::Command.constants.map(&CommandTag::Command.method(:const_get)).grep(Module) do |mod|
      base.include(mod)
    end
  end
end