Class: AbstractSheet
- Inherits:
-
Object
- Object
- AbstractSheet
- Includes:
- LoggerSetup
- Defined in:
- lib/cuker/writer_helper/abstract_writer.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#rows ⇒ Object
Returns the value of attribute rows.
Attributes included from LoggerSetup
Instance Method Summary collapse
- #add_row(ary) ⇒ Object (also: #add_line)
- #current_row ⇒ Object
-
#initialize(name) ⇒ AbstractSheet
constructor
A new instance of AbstractSheet.
-
#read_rows ⇒ Object
Ary of rows.
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
#name ⇒ Object
Returns the value of attribute name.
56 57 58 |
# File 'lib/cuker/writer_helper/abstract_writer.rb', line 56 def name @name end |
#rows ⇒ Object
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_row ⇒ Object
64 65 66 |
# File 'lib/cuker/writer_helper/abstract_writer.rb', line 64 def current_row @rows.size + 1 end |
#read_rows ⇒ Object
74 75 76 |
# File 'lib/cuker/writer_helper/abstract_writer.rb', line 74 def read_rows @rows end |