class ReVIEW::MD2INAOBuilder
Public Instance Methods
cmd(lines)
click to toggle source
# File lib/review/md2inaobuilder.rb, line 20 def cmd(lines) # WEB+DB では使っていないらしいけど puts '!!! cmd' lines.each { |line| puts detab(line) } puts '' end
compile_ruby(base, ruby)
click to toggle source
# File lib/review/md2inaobuilder.rb, line 43 def compile_ruby(base, ruby) if base.length == 1 %Q[<span class='monoruby'>#{escape_html(base)}(#{escape_html(ruby)})</span>] else %Q[<span class='groupruby'>#{escape_html(base)}(#{escape_html(ruby)})</span>] end end
dd(lines)
click to toggle source
# File lib/review/md2inaobuilder.rb, line 35 def dd(lines) puts "<dd>#{lines.join}</dd>" end
dl_begin()
click to toggle source
# File lib/review/md2inaobuilder.rb, line 27 def dl_begin puts '<dl>' end
dl_end()
click to toggle source
# File lib/review/md2inaobuilder.rb, line 39 def dl_end puts '</dl>' end
dt(line)
click to toggle source
# File lib/review/md2inaobuilder.rb, line 31 def dt(line) puts "<dt>#{line}</dt>" end
list_header(id, caption, lang)
click to toggle source
# 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)
click to toggle source
# File lib/review/md2inaobuilder.rb, line 9 def paragraph(lines) puts ' ' + lines.join puts "\n" end