Sha256: ffafa8b9c5decb94bfa549ef95c08067bb1754f350e4030c7f40d649e39f60be
Contents?: true
Size: 503 Bytes
Versions: 2
Compression:
Stored size: 503 Bytes
Contents
# -*- encoding: utf-8 -*- require 'uri' module Genit # Base class for builder that should relativize # some links in a XHTML document. class Relativizer < BuilderBase def not_an_internal_link? @path.nil? or @path =~ URI::regexp end private def update link, field @path = link[field] return if not_an_internal_link? nb = BuilderBase::get_number_of_base_dirs @page_name make_relative nb link[field] = @path end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
genit-2.1 | lib/genit/builders/relativizer.rb |
genit-2.0 | lib/genit/builders/relativizer.rb |