Class: ReVIEW::MD2INAOBuilder

Inherits:
MARKDOWNBuilder show all
Defined in:
lib/review/md2inaobuilder.rb

Constant Summary

Constants included from HTMLUtils

HTMLUtils::ESC

Constants inherited from Builder

Builder::CAPTION_TITLES

Instance Attribute Summary

Attributes inherited from Builder

#doc_status

Instance Method Summary collapse

Methods inherited from MARKDOWNBuilder

#blank, #captionblock, #comment, #compile_href, #compile_kw, #emlist, #extname, #flushright, #footnote, #headline, #hr, #image_dummy, #image_ext, #image_image, #indepimage, #inline_b, #inline_br, #inline_code, #inline_comment, #inline_dtp, #inline_em, #inline_fn, #inline_i, #inline_icon, #inline_img, #inline_strong, #inline_sub, #inline_sup, #inline_tt, #inline_u, #list_body, #listnum_body, #nofunc_text, #noindent, #ol_begin, #ol_end, #ol_item, #pagebreak, #puts, #quote, #table, #table_begin, #table_border, #table_end, #table_header, #td, #th, #tr, #ul_begin, #ul_end, #ul_item_begin, #ul_item_end

Methods included from HTMLUtils

#escape, #escape_comment, #highlight, #highlight?, #highlight_pygments, #highlight_rouge, #normalize_id, #strip_html, #unescape

Methods included from TextUtils

#detab, #split_paragraph

Methods inherited from Builder

#bibpaper, #bind, #blankline, #captionblock, #compile_inline, #detab, #embed, #emtable, #error, #escape, #extract_chapter_id, #firstlinenum, #get_chap, #graph, #graph_aafigure, #graph_blockdiag, #graph_gnuplot, #graph_graphviz, #graph_plantuml, #handle_metric, #image, #image_ext, #initialize, #inline_balloon, #inline_bou, #inline_chap, #inline_chapref, #inline_column, #inline_column_chap, #inline_embed, #inline_eq, #inline_fn, #inline_hd, #inline_href, #inline_img, #inline_imgref, #inline_include, #inline_kw, #inline_list, #inline_pageref, #inline_raw, #inline_ruby, #inline_table, #inline_tcy, #inline_title, #inline_w, #inline_wb, #line_num, #list, #listnum, #load_words, #over_secnolevel?, #parse_metric, #post_paragraph, #pre_paragraph, #print, #puts, #raw, #result, #result_metric, #source, #system_graph, #table, #target_name, #text, #tsize, #ul_item_begin, #ul_item_end, #unescape, #warn

Constructor Details

This class inherits a constructor from ReVIEW::Builder

Instance Method Details

#cmd(lines) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/review/md2inaobuilder.rb', line 20

def cmd(lines)
  # WEB+DB では使っていないらしいけど
  puts '!!! cmd'
  lines.each do |line|
    puts detab(line)
  end
  puts ''
end

#compile_ruby(base, ruby) ⇒ Object



45
46
47
48
49
50
51
# File 'lib/review/md2inaobuilder.rb', line 45

def compile_ruby(base, ruby)
  if base.length == 1
    %Q[<span class='monoruby'>#{escape(base)}(#{escape(ruby)})</span>]
  else
    %Q[<span class='groupruby'>#{escape(base)}(#{escape(ruby)})</span>]
  end
end

#dd(lines) ⇒ Object



37
38
39
# File 'lib/review/md2inaobuilder.rb', line 37

def dd(lines)
  puts "<dd>#{lines.join}</dd>"
end

#dl_beginObject



29
30
31
# File 'lib/review/md2inaobuilder.rb', line 29

def dl_begin
  puts '<dl>'
end

#dl_endObject



41
42
43
# File 'lib/review/md2inaobuilder.rb', line 41

def dl_end
  puts '</dl>'
end

#dt(line) ⇒ Object



33
34
35
# File 'lib/review/md2inaobuilder.rb', line 33

def dt(line)
  puts "<dt>#{line}</dt>"
end

#list_header(id, caption, lang) ⇒ Object



14
15
16
17
18
# File 'lib/review/md2inaobuilder.rb', line 14

def list_header(id, caption, lang)
  lang ||= ''
  puts "```#{lang}"
  print %Q(●リスト#{@chapter.list(id).number}::#{compile_inline(caption)}\n\n)
end

#paragraph(lines) ⇒ Object



9
10
11
12
# File 'lib/review/md2inaobuilder.rb', line 9

def paragraph(lines)
  puts ' ' + lines.join
  puts "\n"
end