Class: BitClust::RDCompiler
- Includes:
- HTMLUtils, TextUtils, Translatable
- Defined in:
- lib/bitclust/rdcompiler.rb
Overview
Compiles doc into HTML.
Constant Summary
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 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, 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.
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/bitclust/rdcompiler.rb', line 28 def initialize(urlmapper, hlevel = 1, opt = {}) @urlmapper = urlmapper @catalog = opt[:catalog] @hlevel = hlevel @type = nil @library = nil @class = nil @method = nil @option = opt.dup (@catalog) end |
Instance Method Details
#compile(src) ⇒ Object
40 41 42 43 44 |
# File 'lib/bitclust/rdcompiler.rb', line 40 def compile(src) setup(src) { library_file } end |
#compile_function(f, opt = nil) ⇒ Object
46 47 48 49 50 51 52 53 54 |
# File 'lib/bitclust/rdcompiler.rb', line 46 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
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/bitclust/rdcompiler.rb', line 57 def compile_method(m, opt = nil) @opt = opt @type = :method @method = m setup(m.source, m) { entry } ensure @opt = nil end |