Class: GherkinReporter
- Inherits:
-
Object
- Object
- GherkinReporter
- Includes:
- LoggerSetup
- Defined in:
- lib/cuker/gherkin_reporter.rb
Overview
Write to Reports
to write out all your parsed gherkins by tags etc.. uses gem ‘writeexcel’
Instance Attribute Summary collapse
-
#file_path ⇒ Object
Returns the value of attribute file_path.
-
#workbook ⇒ Object
Returns the value of attribute workbook.
Attributes included from LoggerSetup
Instance Method Summary collapse
-
#initialize(writer, model, loc, file_name = nil) ⇒ GherkinReporter
constructor
A new instance of GherkinReporter.
- #write ⇒ Object
Methods included from LoggerSetup
#init_logger, reset_appender_log_levels
Constructor Details
#initialize(writer, model, loc, file_name = nil) ⇒ GherkinReporter
Returns a new instance of GherkinReporter.
13 14 15 16 17 18 19 20 21 |
# File 'lib/cuker/gherkin_reporter.rb', line 13 def initialize(writer, model, loc, file_name = nil) init_logger @writer = writer @model = model @file_path = FileHelper.file_path(loc, "#{LOG_TIME_NOW}_#{file_name}") @log.info "Report file => #{@file_name}#{@writer.ext}" end |
Instance Attribute Details
#file_path ⇒ Object
Returns the value of attribute file_path.
11 12 13 |
# File 'lib/cuker/gherkin_reporter.rb', line 11 def file_path @file_path end |
#workbook ⇒ Object
Returns the value of attribute workbook.
11 12 13 |
# File 'lib/cuker/gherkin_reporter.rb', line 11 def workbook @workbook end |
Instance Method Details
#write ⇒ Object
23 24 25 26 27 28 |
# File 'lib/cuker/gherkin_reporter.rb', line 23 def write @writer.make_file @file_path @writer.write_title @model.title @model.data.each {|row| @writer.write_new_row row} @file_path end |