Module: Ghaki::Report::Mixin::OutputFile
- Defined in:
- lib/ghaki/report/mixin/output_file.rb
Instance Attribute Summary collapse
-
#output_file ⇒ Object
Returns the value of attribute output_file.
Instance Method Summary collapse
- #initialize(opts = {}) ⇒ Object
- #output_finish ⇒ Object
- #output_prepare ⇒ Object
- #output_report ⇒ Object
- #output_to_format(out_file) ⇒ Object
Instance Attribute Details
#output_file ⇒ Object
Returns the value of attribute output_file.
9 10 11 |
# File 'lib/ghaki/report/mixin/output_file.rb', line 9 def output_file @output_file end |
Instance Method Details
#initialize(opts = {}) ⇒ Object
11 12 13 |
# File 'lib/ghaki/report/mixin/output_file.rb', line 11 def initialize opts={} ; super opts @output_file = opts[:output_file] end |
#output_finish ⇒ Object
23 24 |
# File 'lib/ghaki/report/mixin/output_file.rb', line 23 def output_finish end |
#output_prepare ⇒ Object
26 27 28 |
# File 'lib/ghaki/report/mixin/output_file.rb', line 26 def output_prepare logger.info 'output file: ' + @output_file end |
#output_report ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/ghaki/report/mixin/output_file.rb', line 15 def output_report output_prepare File.with_opened_temp @output_file do |tmp_file| output_to_format tmp_file end output_finish end |
#output_to_format(out_file) ⇒ Object
30 31 |
# File 'lib/ghaki/report/mixin/output_file.rb', line 30 def output_to_format out_file end |