Class: EPIC::Collection
- Inherits:
-
Resource
- Object
- Resource
- EPIC::Collection
- Includes:
- Enumerable
- Defined in:
- src/epic_collection.rb
Overview
Abstract base class for all collection-style resources in this web service.
Direct Known Subclasses
Defined Under Namespace
Classes: Recursive
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 Resource
#initialize, #lock, lock, #unlock
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_struct
Constructor Details
This class inherits a constructor from EPIC::Resource
Instance Method Details
- (Boolean) recurse?
54 55 56 57 58 59 |
# File 'src/epic_collection.rb', line 54 def recurse? depth = self.class.const_defined?( :DEFAULT_DEPTH ) ? DEFAULT_DEPTH.to_s : '0' depth = Rackful::Request.current.env['HTTP_DEPTH'] || depth self.requested? && '0' != depth || 'infinity' == depth end |
- (void) to_rackful
61 62 63 |
# File 'src/epic_collection.rb', line 61 def to_rackful self.recurse? ? Recursive.new(self) : self end |
- (void) xhtml
65 66 67 |
# File 'src/epic_collection.rb', line 65 def xhtml '<h1>Contents:</h1>' end |