lib/pancake/paths.rb
def dirs_and_glob_for(name, opts = {})
      if _load_paths[name].blank?
        []
      else
        result = []
        invert = !!opts[:invert]
        load_paths = invert ? _load_paths[name].reverse : _load_paths[name]
        roots.each do |root|
          load_paths.each do |paths, glob|
            paths = paths.reverse if invert
            paths.each do |path|
              result << [File.join(root, path), glob]
            end # paths.each
          end # load_paths.each
        end # roots.each
        result
      end # if
    end
def dirs_and_glob_for(name, opts = {})
      if _load_paths[name].blank?
        []
      else
        result = []
        invert = !!opts[:invert]
        load_paths = invert ? _load_paths[name].reverse : _load_paths[name]
        roots.each do |root|
          load_paths.each do |paths, glob|
            paths = paths.reverse if invert
            paths.each do |path|
              result << [File.join(root, path), glob]
            end # paths.each
          end # load_paths.each
        end # roots.each
        result
      end # if
    end
def dirs_and_glob_for ( name , opts = { } ) if _load_paths [ name ] . blank? [ ] else result = [ ] invert = ! ! opts [ :invert ] load_paths = invert ? _load_paths [ name ] . reverse : _load_paths [ name ] roots . each do | root | load_paths . each do | paths , glob | paths = paths . reverse if invert paths . each do | path | result << [ File . join ( root , path ) , glob ] end # paths.each end # load_paths.each end # roots.each result end # if end
Provides the list of paths (directories) and the associated globs for a given name.

 @param        [Symbol]    name    The name of the path group
 @param        [Hash]      opts    A hash of options
 @option opts  [Boolean]   :invert (false) Inverts the order of the paths

 @example
   MyClass.dirs_and_glob_for(:models)

 @return [Array] An array of [path, glob] arrays
   Returned in declared order unless the :invert option is set
 @api public
 @since 0.1.1
 @author Daniel Neighman
Provides the list of paths ( directories ) and the associated globs for a given name .