lib/webby/renderer.rb
# Attempts to locate a partial by name. If only the partial name is given,
# then the current directory of the page being rendered is searched for
# the partial. If a full path is given, then the partial is searched for
# in that directory.
#
# Raies a Webby::Error if the partial could not be found.
#
Attempts to locate a partial by name. If only the partial name is given,
then the current directory of the page being rendered is searched for
the partial. If a full path is given, then the partial is searched for
in that directory.

Raies a Webby::Error if the partial could not be found.
Attempts to locate a partial by name . If only the partial name is given then the current directory of the page being rendered is searched for the partial . If a full path is given then the partial is searched for in that directory . Raies a Webby :: Error if the partial could not be found .
def _find_partial( part )
    case part
    when String
      part_dir = ::File.dirname(part)
      part_dir = @page.dir if part_dir == '.'
      part_fn = ::File.basename(part)
      part_fn = '_' + part_fn unless part_fn =~ %r/^_/
      p = Resources.partials.find(
          :filename => part_fn, :in_directory => part_dir ) rescue nil
      raise ::Webby::Error, "could not find partial '#{part}'" if p.nil?
      p
    when ::Webby::Resources::Partial
      part
    else raise ::Webby::Error, "expecting a partial or a partial name" end
  end
def _find_partial ( part ) case part when String part_dir = :: File . dirname ( part ) part_dir = @page . dir if part_dir == '.' part_fn = :: File . basename ( part ) part_fn = '_' + part_fn unless part_fn =~ %r/ ^_ / p = Resources . partials . find ( :filename => part_fn , :in_directory => part_dir ) rescue nil raise :: Webby :: Error , "could not find partial '#{part}'" if p . nil? p when :: Webby :: Resources :: Partial part else raise :: Webby :: Error , "expecting a partial or a partial name" end end
Attempts to locate a partial by name.
Attempts to locate a partial by name .
part