Module: TrueWeb::Plugins::DirectoryFirstSort

Extended by:
DirectoryFirstSort
Included in:
DirectoryFirstSort
Defined in:
lib/true-web/plugins/directory_first_sort.rb

Instance Method Summary collapse

Instance Method Details

#directory_first_sortObject



4
5
6
7
8
9
# File 'lib/true-web/plugins/directory_first_sort.rb', line 4

def directory_first_sort
  lambda do |path|
    dir = File.dirname(path)
    [dir.length, dir, File.basename(path)]
  end
end