In Files

Included Modules

Gibbler::File

Creates a digest based on: CLASS:PATHLENGTH:PATH where PATHLENGTH is the length of the PATH string. PATH is not modified in any way (it is not converted to an absolute path).

NOTE: You may expect this method to include other information like the file contents and modified date (etc...). The reason we do not is because Gibbler is concerned only about Ruby and not the outside world. There are many complexities in parsing file data and attributes which would make it difficult to run across platforms and Ruby versions / engines. If you want to

e.g.

File.new('.')        # => c8bc8b3a
File.new('/tmp')     # => 3af85a19
File.new('/tmp/')    # => 92cbcb7d

Public Class Methods

included(obj) click to toggle source
# File lib/gibbler.rb, line 651
def self.included(obj)
  obj.extend Attic
  obj.attic :gibbler_cache
end

Public Instance Methods

__gibbler(digest_type=nil) click to toggle source

Creates a digest for the current state of self.

# File lib/gibbler.rb, line 657
def __gibbler(digest_type=nil)
  klass = self.class
  value = self.nil? ? "\00"" : self.path
  a = Gibbler.digest "%s:%d:%s" % [klass, value.size, value], digest_type
  gibbler_debug klass, a, [klass, value.size, value]
  a
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.