module Workbook::Modules::BookDiffSort::ClassMethods

Public Instance Methods

new_diff_template() click to toggle source

Return template table to write the diff result in; in case non exists a default is generated.

@return [Workbook::Table] the empty table, linked to a book

# File lib/workbook/modules/diff_sort.rb, line 13
def new_diff_template
    diffbook = Workbook::Book.new
    template = diffbook.template
    f = template.create_or_find_format_by 'destroyed'
    f[:background_color]=:red
    f = template.create_or_find_format_by 'updated'
    f[:background_color]=:yellow
    f = template.create_or_find_format_by 'created'
    f[:background_color]=:lime
    f = template.create_or_find_format_by 'header'
    f[:rotation] = 72
    f[:font_weight] = :bold
    f[:height] = 80
    diffbook
end