Class: Renogen::Formatters::PlainText

Inherits:
Base
  • Object
show all
Defined in:
lib/renogen/formatters/plain_text.rb

Overview

For formatting a change as plain text

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#header, #initialize, register, #table_formatter?, #write_footer, #write_group_end

Constructor Details

This class inherits a constructor from Renogen::Formatters::Base

Instance Method Details

#write_change(change) ⇒ String

Outputs a line or block as the body for a change.

Parameters:

  • change (String)

Returns:

  • (String)


28
29
30
# File 'lib/renogen/formatters/plain_text.rb', line 28

def write_change(change)
  "- #{change}"
end

#write_group(group) ⇒ String

Outputs a line or block as a header for a group.

Parameters:

  • group (String)

Returns:

  • (String)


20
21
22
# File 'lib/renogen/formatters/plain_text.rb', line 20

def write_group(group)
  "#{group}"
end

#write_header(header) ⇒ String

Outputs a line or block of text appearing at the top of the change log.

Parameters:

  • header (String)

Returns:

  • (String)


12
13
14
# File 'lib/renogen/formatters/plain_text.rb', line 12

def write_header(header)
  "#{header}\n "
end