Class: JiraFile
- Inherits:
-
AbstractSheet
- Object
- AbstractSheet
- JiraFile
- Defined in:
- lib/cuker/writer_helper/jira_writer.rb
Instance Attribute Summary
Attributes inherited from AbstractSheet
Attributes included from LoggerSetup
Instance Method Summary collapse
- #add_line(line) ⇒ Object
-
#initialize(path, ext) ⇒ JiraFile
constructor
A new instance of JiraFile.
-
#read_rows ⇒ Object
Ary of rows.
Methods inherited from AbstractSheet
Methods included from LoggerSetup
#init_logger, reset_appender_log_levels
Constructor Details
#initialize(path, ext) ⇒ JiraFile
36 37 38 39 40 |
# File 'lib/cuker/writer_helper/jira_writer.rb', line 36 def initialize path, ext file_name = "#{path}#{ext}" super file_name @csv_sheet = File.open(file_name, "wb") end |
Instance Method Details
#add_line(line) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/cuker/writer_helper/jira_writer.rb', line 42 def add_line line super line @log.warn "argument not a String.. instead is a '#{line.class}' -> '#{line}'" unless line.is_a? String File.open(@name, "ab") do |file| file << "#{line}\n" end end |
#read_rows ⇒ Object
51 52 53 |
# File 'lib/cuker/writer_helper/jira_writer.rb', line 51 def read_rows @rows = File.read(@name) end |