islo/lib/islo.rb

21 lines
414 B
Ruby

# Islo - application isolator
module Islo
class << self
def commands
@commands ||= {}
end
def register(command)
commands[command.name.to_sym] = command
end
def command(args, options = {})
name = File.basename(args[0]).to_sym
(commands[name] || Command).new(args, options)
end
end
end
[:mysql, :postgres, :redis].each do |c|
require "islo/commands/#{c}"
end