Class: AbstractSheet

Inherits:
Object
  • Object
show all
Includes:
LoggerSetup
Defined in:
lib/cuker/writer_helper/abstract_writer.rb

Direct Known Subclasses

CsvSheet, JiraFile, RubyXLWriter::RubyXLSheet

Instance Attribute Summary collapse

Attributes included from LoggerSetup

#log

Instance Method Summary collapse

Methods included from LoggerSetup

#init_logger, reset_appender_log_levels

Constructor Details

#initialize(name) ⇒ AbstractSheet



58
59
60
61
62
# File 'lib/cuker/writer_helper/abstract_writer.rb', line 58

def initialize name
  init_logger
  @name = name
  @rows = []
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



56
57
58
# File 'lib/cuker/writer_helper/abstract_writer.rb', line 56

def name
  @name
end

#rowsObject

Returns the value of attribute rows.



56
57
58
# File 'lib/cuker/writer_helper/abstract_writer.rb', line 56

def rows
  @rows
end

Instance Method Details

#add_row(ary) ⇒ Object Also known as: add_line



68
69
70
# File 'lib/cuker/writer_helper/abstract_writer.rb', line 68

def add_row ary
  @rows << ary
end

#current_rowObject



64
65
66
# File 'lib/cuker/writer_helper/abstract_writer.rb', line 64

def current_row
  @rows.size + 1
end

#read_rowsObject



74
75
76
# File 'lib/cuker/writer_helper/abstract_writer.rb', line 74

def read_rows
  @rows
end