Module: RDocF95::Generator
- Included in:
- HTML
- Defined in:
- lib/rdoc-f95/generator.rb
Defined Under Namespace
Modules: MarkUp Classes: AllReferences, CHM, Class, Context, File, HTML, HTMLInOne, Method, RI, XHTML, XHTMLInOne, XML
Constant Summary collapse
- FILE_DIR =
Name of sub-direcory that holds file descriptions
"files"
- CLASS_DIR =
Name of sub-direcory that holds class descriptions
"classes"
- CSS_NAME =
Name of the RDoc CSS file
"rdoc-style.css"
Class Method Summary collapse
-
.gen_url(path, target) ⇒ Object
Converts a target url to one that is relative to a given path.
Class Method Details
.gen_url(path, target) ⇒ Object
Converts a target url to one that is relative to a given path
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/rdoc-f95/generator.rb', line 27 def self.gen_url(path, target) from = ::File.dirname path to, to_file = ::File.split target from = from.split "/" to = to.split "/" while from.size > 0 and to.size > 0 and from[0] == to[0] do from.shift to.shift end from.delete_if{|f| f =~ /^\.$/} from.fill ".." from.concat to from << to_file ::File.join(*from) end |