Method: ReVIEW::HTMLBuilder#table_header

Defined in:
lib/review/htmlbuilder.rb

#table_header(id, caption) ⇒ Object



744
745
746
747
748
749
750
751
752
# File 'lib/review/htmlbuilder.rb', line 744

def table_header(id, caption)
  if id.nil?
    puts %Q(<p class="caption">#{compile_inline(caption)}</p>)
  elsif get_chap
    puts %Q(<p class="caption">#{I18n.t('table')}#{I18n.t('format_number_header', [get_chap, @chapter.table(id).number])}#{I18n.t('caption_prefix')}#{compile_inline(caption)}</p>)
  else
    puts %Q(<p class="caption">#{I18n.t('table')}#{I18n.t('format_number_header_without_chapter', [@chapter.table(id).number])}#{I18n.t('caption_prefix')}#{compile_inline(caption)}</p>)
  end
end