Module: Heel
- Defined in:
- lib/heel.rb,
lib/heel/logger.rb,
lib/heel/server.rb,
lib/heel/rackapp.rb,
lib/heel/request.rb,
lib/heel/version.rb,
lib/heel/mime_map.rb,
lib/heel/configuration.rb,
lib/heel/error_response.rb,
lib/heel/directory_indexer.rb
Overview
– Copyright © 2007, 2008 Jeremy Hinegardner All rights reserved. Licensed under BSD license. See LICENSE for details. ++
Defined Under Namespace
Modules: Configuration, Version Classes: DirectoryIndexer, ErrorResponse, Logger, MimeMap, RackApp, Request, Server
Constant Summary collapse
Class Method Summary collapse
-
.require_all_libs_relative_to_me ⇒ Object
recursively descend the directory with the same name as this file and do a require ‘heel/path/to/file’.
Class Method Details
.require_all_libs_relative_to_me ⇒ Object
recursively descend the directory with the same name as this file and do a require ‘heel/path/to/file’
10 11 12 13 14 15 16 17 18 |
# File 'lib/heel.rb', line 10 def self.require_all_libs_relative_to_me remove_parent = File.dirname(File.(__FILE__)) + File::SEPARATOR descend_dir = File.join(remove_parent,File.basename(__FILE__, ".rb")) Dir.glob("#{descend_dir}/**/*.rb").each do |rb| lib = rb.gsub(remove_parent,'') require lib end end |