Class: BitClust::RDCompiler
- Includes:
- HTMLUtils, TextUtils, Translatable, VersionBadges
- Defined in:
- lib/bitclust/rdcompiler.rb
Overview
Compiles doc into HTML.
Direct Known Subclasses
Constant Summary
Constants included from VersionBadges
VersionBadges::SINCE_CATALOG_KEY, VersionBadges::SINCE_CSS_CLASS, VersionBadges::UNTIL_CATALOG_KEY, VersionBadges::UNTIL_CSS_CLASS
Constants included from TextUtils
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 Method Summary collapse
- #compile(src) ⇒ Object
- #compile_function(f, opt = nil) ⇒ Object
-
#compile_method(m, opt = nil) ⇒ Object
FIXME.
-
#initialize(urlmapper, hlevel = 1, opt = {}) ⇒ RDCompiler
constructor
A new instance of RDCompiler.
Methods included from VersionBadges
#heading_version_badges, #row_version_badges
Methods included from TextUtils
detab, n_indent, n_minimum_indent, unindent, unindent_block
Methods included from NameUtils
build_method_id, classid2name, classname2id, classname?, decodeid, decodename_fs, decodename_url, display_typemark, 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
#initialize(urlmapper, hlevel = 1, opt = {}) ⇒ RDCompiler
Returns a new instance of RDCompiler.
31 32 33 34 35 36 37 38 39 |
# File 'lib/bitclust/rdcompiler.rb', line 31 def initialize(urlmapper, hlevel = 1, opt = {}) @urlmapper = urlmapper @catalog = opt[:catalog] @hlevel = hlevel @type = nil @method = nil @option = opt.dup (@catalog || MessageCatalog.new({}, 'C')) end |
Instance Method Details
#compile(src) ⇒ Object
41 42 43 44 45 |
# File 'lib/bitclust/rdcompiler.rb', line 41 def compile(src) setup(src) { library_file } end |
#compile_function(f, opt = nil) ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lib/bitclust/rdcompiler.rb', line 47 def compile_function(f, opt = nil) @opt = opt @type = :function setup(f.source, f) { entry } ensure @opt = nil end |
#compile_method(m, opt = nil) ⇒ Object
FIXME
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/bitclust/rdcompiler.rb', line 58 def compile_method(m, opt = nil) @opt = opt @type = :method @method = m setup(m.source, m) { entry } ensure @opt = nil end |