def register(slice_file, force = true)
identifier = File.basename(slice_file, '.rb')
underscored = identifier.gsub('-', '_')
module_name = underscored.camel_case
slice_path = File.expand_path(File.dirname(slice_file) + '/..')
if !self.paths.include?(slice_path) || force
Merb.logger.verbose!("Registered slice '#{module_name}' located at #{slice_path}") if force
self.files[module_name] = slice_file
self.paths[module_name] = slice_path
slice_mod = setup_module(module_name)
slice_mod.identifier = identifier
slice_mod.identifier_sym = underscored.to_sym
slice_mod.root = slice_path
slice_mod.file = slice_file
slice_mod.registered
slice_mod
else
Merb.logger.info!("Already registered slice '#{module_name}' located at #{slice_path}")
Object.full_const_get(module_name)
end
end