Class: Rspec::Axlsx::Formatter::Core
- Inherits:
-
Object
- Object
- Rspec::Axlsx::Formatter::Core
- Defined in:
- lib/rspec/axlsx/formatter/core.rb
Constant Summary collapse
- ALL_IN_ONE_SHEET =
0
Instance Method Summary collapse
-
#initialize ⇒ Core
constructor
A new instance of Core.
- #to_sheet(example_groups) ⇒ Object
Constructor Details
#initialize ⇒ Core
Returns a new instance of Core.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rspec/axlsx/formatter/core.rb', line 11 def initialize() @p = ::Axlsx::Package.new @workbook = @p.workbook @report_dir = ENV["XLSX_REPORT"] || "spec/xlsx" @example_num = 0 #@describe_column = ["Expected"] @describe_column = [] @sheet_mode = ALL_IN_ONE_SHEET end |
Instance Method Details
#to_sheet(example_groups) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/rspec/axlsx/formatter/core.rb', line 24 def to_sheet(example_groups) @example_groups = example_groups convert_to_sheet do |worksheet| end @p.use_shared_strings = true FileUtils.mkdir_p(@report_dir) @p.serialize("#{@report_dir}/report.xlsx") end |