Class: Renogen::Formatters::Html
- Defined in:
- lib/renogen/formatters/html.rb
Overview
For formatting a change into html format
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#write_change(change) ⇒ String
Outputs a line or block as the body for a change.
-
#write_footer(changelog) ⇒ String
Outputs a line or block of text appearing at the bottom of the change log.
-
#write_group(group) ⇒ String
Outputs a line or block as a header for a group.
-
#write_group_end ⇒ String
Outputs a line or block of text appearing after a group.
-
#write_header(header) ⇒ String
Outputs a line or block of text appearing at the top of the change log.
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.
34 35 36 |
# File 'lib/renogen/formatters/html.rb', line 34 def write_change(change) " <li>#{change}</li>" end |
#write_footer(changelog) ⇒ String
Outputs a line or block of text appearing at the bottom of the change log.
42 43 44 |
# File 'lib/renogen/formatters/html.rb', line 42 def (changelog) '</html>' end |
#write_group(group) ⇒ String
Outputs a line or block as a header for a group.
19 20 21 |
# File 'lib/renogen/formatters/html.rb', line 19 def write_group(group) "<h2>#{group}</h2>\n<ul>" end |
#write_group_end ⇒ String
Outputs a line or block of text appearing after a group.
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.
11 12 13 |
# File 'lib/renogen/formatters/html.rb', line 11 def write_header(header) "<html>\n<h1>#{header}</h1>\n" end |