Module: Documatic

Defined in:
lib/documatic.rb,
lib/documatic/component.rb,
lib/documatic/formatter/open_document.rb,
lib/documatic/open_document_text/helper.rb,
lib/documatic/open_document_spreadsheet/helper.rb

Overview

The module “Documatic” is the namespace for the other modules and classes in this project. It also contains some convenience methods.

Defined Under Namespace

Modules: Formatter, OpenDocumentSpreadsheet, OpenDocumentText Classes: Component

Class Method Summary collapse

Class Method Details

.add_helper(helper_module) ⇒ Object

Short-cut method for including a helper in Documatic::OpenDocumentText::Component (the ERb processor). This is the ‘old’ method that pre-dates the spreadsheet component – that’s why it only adds the helper to the text component.



23
24
25
# File 'lib/documatic.rb', line 23

def add_helper(helper_module)
  Documatic::OpenDocumentText::Component.send(:include, helper_module)
end

.spreadsheet_helper(helper_module) ⇒ Object

Short-cut method for including a helper in Documatic::OpenDocumentSpreadsheet::Component.



35
36
37
38
# File 'lib/documatic.rb', line 35

def spreadsheet_helper(helper_module)
  Documatic::OpenDocumentSpreadsheet::Component.send(:include,
                                                     helper_module)
end

.text_helper(helper_module) ⇒ Object

Short-cut method for including a helper in Documatic::OpenDocumentText::Component.



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

def text_helper(helper_module)
  add_helper helper_module
end