Class that makes it possible to easily use multiple public directories in your Ramaze application.
@author Michael Fellinger @since 14-03-2009
Creates a new instance of the class, stores the given root directories and syncs the changes with Rack::Cascade.
@author Michael Fellinger @since 14-03-2009 @param [Array] *roots A set of root directories that contain a number of
public directories.
# File lib/ramaze/files.rb, line 19 19: def initialize(*roots) 20: @roots = roots.flatten.map{|root| File.expand_path(root.to_s) } 21: sync 22: end
Adds a new path to the list of root directories.
@author Michael Fellinger @since 14-03-2009 @param [String] path The path to add to the existing root directories.
# File lib/ramaze/files.rb, line 42 42: def <<(path) 43: @roots << File.expand_path(path.to_s) 44: @roots.uniq! 45: sync 46: end
Allows this class to be called as a Rack middleware.
@author Michael Fellinger @since 14-03-2009 @param [Hash] env Hash containing all the environment details.
# File lib/ramaze/files.rb, line 31 31: def call(env) 32: @cascade.call(env) 33: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.