Module: CommandHandler::Utils

Defined in:
lib/advanced_ruby_command_handler/app/utils.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.get_command(command_name) ⇒ Object



5
6
7
8
9
# File 'lib/advanced_ruby_command_handler/app/utils.rb', line 5

def self.get_command(command_name)
  return Commands.method(command_name).call if defined?(Commands) && Commands.respond_to?(command_name)

  false
end

Instance Method Details

#reload_files(dirs) ⇒ Object

Do NOT use that FIXME



13
14
15
16
17
# File 'lib/advanced_ruby_command_handler/app/utils.rb', line 13

def reload_files(dirs)
  dirs.each do |dir|
    Dir.glob("#{dir}/**/*.rb").each { |file| load file }
  end
end