Class: SimpleReport::Base
- Inherits:
-
Object
- Object
- SimpleReport::Base
- Defined in:
- lib/simple_report/base.rb
Instance Method Summary collapse
- #add_format(name, format) ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #report_xls(*params) ⇒ Object
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
3 4 5 |
# File 'lib/simple_report/base.rb', line 3 def initialize @sheets = [] end |
Instance Method Details
#add_format(name, format) ⇒ Object
7 8 9 10 |
# File 'lib/simple_report/base.rb', line 7 def add_format(name, format) @formats ||= {} @formats[name] = format end |
#report_xls(*params) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/simple_report/base.rb', line 12 def report_xls(*params) report(*params) generate_report @workbook.close File.read @file.path end |