Class: Cuker::JiraWriter

Inherits:
AbstractWriter show all
Defined in:
lib/cuker/helpers/writers/jira_writer.rb

Constant Summary

Constants inherited from AbstractWriter

AbstractWriter::NoNewFileMadeError

Instance Attribute Summary

Attributes inherited from AbstractWriter

#active_file, #active_file_name, #book, #ext, #out_dir

Attributes included from LoggerSetup

#log

Instance Method Summary collapse

Methods inherited from AbstractWriter

#finishup, #make_name, #new_name, #raise_unless_active_loc, #write

Methods included from LoggerSetup

#init_logger, reset_appender_log_levels

Methods included from Interface

#method

Constructor Details

#initializeJiraWriter

Returns a new instance of JiraWriter.



5
6
7
8
9
# File 'lib/cuker/helpers/writers/jira_writer.rb', line 5

def initialize
  @ext = '.txt'
  super
  @log.debug "initing #{self.class}"
end

Instance Method Details

#make_new_file(name) ⇒ Object



29
30
31
32
33
34
# File 'lib/cuker/helpers/writers/jira_writer.rb', line 29

def make_new_file name
  path = super name
  @book[path] = JiraFile.new path
  @active_file = @book[path]
  path
end

#make_new_sheet(name = nil) ⇒ Object



23
24
25
26
27
# File 'lib/cuker/helpers/writers/jira_writer.rb', line 23

def make_new_sheet name = nil
  @log.debug "JW make new sheet"
  path = super name
  path
end

#write_new_row(row_line) ⇒ Object



17
18
19
20
21
# File 'lib/cuker/helpers/writers/jira_writer.rb', line 17

def write_new_row row_line
  super row_line
  @log.trace "JW write row: #{row_line}"
  @active_file.add_line row_line
end

#write_title(title_line) ⇒ Object



11
12
13
14
15
# File 'lib/cuker/helpers/writers/jira_writer.rb', line 11

def write_title title_line
  super title_line
  @log.trace "JW write title: #{title_line}"
  @active_file.add_line title_line
end