Class: RockBooks::JournalReport
- Inherits:
-
Object
- Object
- RockBooks::JournalReport
- Includes:
- ErbHelper, TextReportHelper
- Defined in:
- lib/rock_books/reports/journal_report.rb
Constant Summary
Constants included from TextReportHelper
TextReportHelper::SHORT_NAME_FORMAT_STRING, TextReportHelper::SHORT_NAME_MAX_LENGTH
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#report_data ⇒ Object
Returns the value of attribute report_data.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(report_data, report_context, filter = nil) ⇒ JournalReport
constructor
A new instance of JournalReport.
Methods included from ErbHelper
erb_template, render_binding, render_hashes
Methods included from TextReportHelper
#account_code_format, #account_code_name_type_string, #account_code_name_type_string_for_code, #acct_name, #banner_line, #center, #end_date, #format_acct_amount, #format_multidoc_entry, #generation_info_display_string, #line_item_format_string, #max_account_code_length, #page_width, #section_heading, #start_date, #template_presentation_context, #total_with_ok_or_discrepancy
Constructor Details
#initialize(report_data, report_context, filter = nil) ⇒ JournalReport
Returns a new instance of JournalReport.
15 16 17 18 |
# File 'lib/rock_books/reports/journal_report.rb', line 15 def initialize(report_data, report_context, filter = nil) @report_data = report_data @context = report_context end |
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
12 13 14 |
# File 'lib/rock_books/reports/journal_report.rb', line 12 def context @context end |
#report_data ⇒ Object
Returns the value of attribute report_data.
12 13 14 |
# File 'lib/rock_books/reports/journal_report.rb', line 12 def report_data @report_data end |
Instance Method Details
#generate ⇒ Object
21 22 23 24 |
# File 'lib/rock_books/reports/journal_report.rb', line 21 def generate presentation_context = template_presentation_context.merge(fn_format_entry: method(:format_entry)) ErbHelper.render_hashes('text/journal.txt.erb', report_data, presentation_context) end |