Class: BitClust::Subcommands::ChmCommand::URLMapperEx

Inherits:
URLMapper show all
Defined in:
lib/bitclust/subcommands/chm_command.rb

Constant Summary

Constants included from NameUtils

NameUtils::CHAR_TO_MARK, NameUtils::CHAR_TO_NAME, NameUtils::CLASS_NAME_RE, NameUtils::CLASS_PATH_RE, NameUtils::CONST_PATH_RE, NameUtils::CONST_RE, NameUtils::GVAR_RE, NameUtils::LIBNAME_RE, NameUtils::MARK_TO_CHAR, NameUtils::MARK_TO_NAME, NameUtils::METHOD_NAME_RE, NameUtils::METHOD_SPEC_RE, NameUtils::MID, NameUtils::NAME_TO_CHAR, NameUtils::NAME_TO_MARK, NameUtils::TYPEMARK_RE

Instance Attribute Summary

Attributes inherited from URLMapper

#base_url

Instance Method Summary collapse

Methods inherited from URLMapper

#cgi_url, #css_url, #custom_css_url, #custom_js_url, #favicon_url, #function_index_url, #function_url, #initialize, #js_url, #library_index_url, #opensearchdescription_url, #search_url, #spec_url

Methods included from NameUtils

build_method_id, classid2name, classname2id, classname?, decodeid, decodename_fs, decodename_url, encodeid, encodename_fs, encodename_rdocurl, encodename_url, functionname?, gvarname?, html_filename, libid2name, libname2id, libname?, method_spec?, methodid2classid, methodid2libid, methodid2mname, methodid2specparts, methodid2specstring, methodid2typechar, methodid2typemark, methodid2typename, methodname?, split_method_id, split_method_spec, typechar2mark, typechar2name, typechar?, typemark2char, typemark2name, typemark?, typename2char, typename2mark, typename?

Constructor Details

This class inherits a constructor from BitClust::URLMapper

Instance Method Details

#class_url(name) ⇒ Object


129
130
131
# File 'lib/bitclust/subcommands/chm_command.rb', line 129

def class_url(name)
  "/class/#{encodename_fs(name)}.html"
end

#document_url(name) ⇒ Object


138
139
140
# File 'lib/bitclust/subcommands/chm_command.rb', line 138

def document_url(name)
  "/doc/#{encodename_fs(name)}.html"
end

#library_url(name) ⇒ Object


121
122
123
124
125
126
127
# File 'lib/bitclust/subcommands/chm_command.rb', line 121

def library_url(name)
  if name == '/'
    "/library/index.html"
  else
    "/library/#{encodename_fs(name)}.html"
  end
end

#method_url(spec) ⇒ Object


133
134
135
136
# File 'lib/bitclust/subcommands/chm_command.rb', line 133

def method_url(spec)
  cname, tmark, mname = *split_method_spec(spec)
  "/method/#{encodename_fs(cname)}/#{typemark2char(tmark)}/#{encodename_fs(mname)}.html"
end