Class: EPIC::Directory Deprecated

Inherits:
Collection show all
Defined in:
src/epic_directory.rb

Overview

Deprecated.

This class doesn’t seem to be used anymore.

Constant Summary

Constant Summary

Constants inherited from Resource

Resource::GLOBAL_LOCK_HASH, Resource::GLOBAL_LOCK_MUTEX

Instance Attribute Summary

Attributes included from Rackful::Resource

#get_etag, #get_last_modified, #path

Instance Method Summary (collapse)

Methods inherited from Collection

#recurse?, #to_rackful, #xhtml

Methods inherited from Resource

#initialize, #lock, lock, #unlock, #xhtml

Methods included from Rackful::Resource

#default_headers, #destroy, #do_METHOD, #empty?, #http_DELETE, #http_GET, #http_HEAD, #http_OPTIONS, #http_PUT, #http_method, #http_methods, included, #requested?, #serializer, #title, #to_rackful, #to_struct

Constructor Details

This class inherits a constructor from EPIC::Resource

Instance Method Details

- (void) each



24
25
26
27
28
29
30
31
32
33
34
35
# File 'src/epic_directory.rb', line 24

def each
  dirname = "./public#{self.path.unescape}"
  Dir.open dirname do
    |dir|
    dir.each do
      |filename|
      filepath = dirname + filename
      yield Rackful::Path.new( self.path + escape_path(filename) ) \
        if File::file? filepath
    end
  end
end