class Webby::Resources::Static - webby-0.9.4 Documentation

# class Webby::Resources::Static

A Static resource is any file in the content folder that does not contain YAML meta-data at the top of the file and does not start with and underscore “_” character (those are partials). Static resources will be copied as-is from the content directory to the output directory.

### Public Instance Methods

dirty?() click to toggle source

Returns `true` if this static file is newer than its corresponding output product. The static file needs to be copied to the output directory.

    # File lib/webby/resources/static.rb, line 22
    def dirty?
      return true unless test(?e, destination)
      @mtime > ::File.mtime(destination)
    end

render() click to toggle source

Returns the contents of the file.

    # File lib/webby/resources/static.rb, line 14
    def render
      Webby.deprecated "render", "it is being replaced by the Renderer#render() method"
      self._read
    end