module Rubysermon
	class ModLoader

		def self.load(new_class)
			begin
				require_relative 'mod/' + new_class.downcase

				capitalized_class = new_class.capitalize
				return (Rubysermon.const_get capitalized_class).new
			rescue LoadError
				raise ModLoaderException, "File module not found"
			end
		end

	end

	class ModLoaderException < Exception; end
end