Object
# File lib/rd/rbl-file.rb, line 26 def RBLFile.basename(path) if /\.(rd|rb)$/ === path $` else path end end
# File lib/rd/rbl-file.rb, line 16 def RBLFile.create_rbl_file(filename, resolver) file = File.open(RBLFile.rbl_file_path(filename), "w") file.print(RBLFile.labels_to_string(resolver)) file.close end
# File lib/rd/rbl-file.rb, line 34 def RBLFile.labels_to_string(resolver) (resolver.collect do |i| i.to_label + " => " + resolver.get_anchor(i) end).join("\n") end
# File lib/rd/rbl-file.rb, line 40 def load_rbl_file(search_paths) f = search_file(@filename, search_paths, [SUFFIX]) raise "RBLFile not found." unless f src = File.readlines(f).join("") @labels = string_to_labels(src) end
# File lib/rd/rbl-file.rb, line 55 def parse_line(src) col = src.rindex("=>") raise "RBL file parse error." unless col label = src[0 .. col - 1].strip anchor = src[col + 2 .. -1].strip [label, anchor] end
Generated with the Darkfish Rdoc Generator 2.