Class: RubyXLWriter

Inherits:
AbstractWriter show all
Defined in:
lib/cuker/writer_helper/ruby_x_l_writer.rb

Defined Under Namespace

Classes: RubyXLSheet

Constant Summary

Constants inherited from AbstractWriter

AbstractWriter::NoNewFileMadeError

Instance Attribute Summary

Attributes inherited from AbstractWriter

#active_sheet, #ext, #out_dir, #sheets

Attributes included from LoggerSetup

#log

Instance Method Summary collapse

Methods inherited from AbstractWriter

#raise_unless_active_loc

Methods included from LoggerSetup

#init_logger, reset_appender_log_levels

Methods included from Interface

#method

Constructor Details

#initializeRubyXLWriter

Returns a new instance of RubyXLWriter.



4
5
6
7
# File 'lib/cuker/writer_helper/ruby_x_l_writer.rb', line 4

def initialize
  super
  @log.debug "initing #{self.class}"
end

Instance Method Details

#make_file(name) ⇒ Object



25
26
27
# File 'lib/cuker/writer_helper/ruby_x_l_writer.rb', line 25

def make_file name
  super name
end

#make_new_sheet(name = nil) ⇒ Object



19
20
21
22
23
# File 'lib/cuker/writer_helper/ruby_x_l_writer.rb', line 19

def make_new_sheet name = nil
  @log.debug "Rxl make new sheet"
  path = super name
  @sheets[name] = RubyXLSheet.new path
end

#write_new_row(row_ary) ⇒ Object



14
15
16
17
# File 'lib/cuker/writer_helper/ruby_x_l_writer.rb', line 14

def write_new_row row_ary
  @log.debug "Rxl write row"
  @active_sheet.add_row row_ary
end

#write_title(title_ary) ⇒ Object



9
10
11
12
# File 'lib/cuker/writer_helper/ruby_x_l_writer.rb', line 9

def write_title title_ary
  @log.debug "Rxl write title"
  @active_sheet.add_row title_ary
end