Class: Adhoq::Reporter::Xlsx
- Inherits:
-
Object
- Object
- Adhoq::Reporter::Xlsx
- Defined in:
- lib/adhoq/reporter/xlsx.rb
Class Method Summary collapse
Instance Method Summary collapse
- #build_report ⇒ Object
-
#initialize(result) ⇒ Xlsx
constructor
A new instance of Xlsx.
Constructor Details
#initialize(result) ⇒ Xlsx
Returns a new instance of Xlsx.
11 12 13 |
# File 'lib/adhoq/reporter/xlsx.rb', line 11 def initialize(result) @result = result end |
Class Method Details
.mime_type ⇒ Object
7 8 9 |
# File 'lib/adhoq/reporter/xlsx.rb', line 7 def self.mime_type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' end |
Instance Method Details
#build_report ⇒ Object
15 16 17 18 19 20 |
# File 'lib/adhoq/reporter/xlsx.rb', line 15 def build_report xlsx = Axlsx::Package.new write_result!(xlsx) xlsx.to_stream end |