Parent

Methods

Class/Module Index [+]

Quicksearch

Webgen::Source::TarArchive::Path

A special Webgen::Path class for handling paths from a tar archive.

Public Class Methods

new(path, data, mtime, uri) click to toggle source

Create a new tar archive path object for the entry entry.

# File lib/webgen/source/tararchive.rb, line 29
def initialize(path, data, mtime, uri)
  super(path) {|mode| StringIO.new(data.to_s, mode) }
  @uri = uri
  @mtime = mtime
  WebsiteAccess.website.cache[[:tararchive_path, @uri, path]] = @mtime if WebsiteAccess.website
  @meta_info['modified_at'] = @mtime
end

Public Instance Methods

changed?() click to toggle source

Return true if the tar archive path used by the object has been modified.

# File lib/webgen/source/tararchive.rb, line 38
def changed?
  !WebsiteAccess.website || @mtime > WebsiteAccess.website.cache[[:tararchive_path, @uri, path]]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.