Class: Renogen::Formatters::Html

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

Overview

For formatting a change into html format

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#header, #initialize, register, #table_formatter?

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)


34
35
36
# File 'lib/renogen/formatters/html.rb', line 34

def write_change(change)
  "  <li>#{change}</li>"
end

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

Parameters:

Returns:

  • (String)


42
43
44
# File 'lib/renogen/formatters/html.rb', line 42

def write_footer(changelog)
  '</html>'
end

#write_group(group) ⇒ String

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

Parameters:

  • group (String)

Returns:

  • (String)


19
20
21
# File 'lib/renogen/formatters/html.rb', line 19

def write_group(group)
  "<h2>#{group}</h2>\n<ul>"
end

#write_group_endString

Outputs a line or block of text appearing after a group.

Returns:

  • (String)


26
27
28
# File 'lib/renogen/formatters/html.rb', line 26

def write_group_end
  "</ul>"
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)


11
12
13
# File 'lib/renogen/formatters/html.rb', line 11

def write_header(header)
  "<html>\n<h1>#{header}</h1>\n"
end