class PostRunner::ViewBottom
This class generates the footer of a HTML page.
Public Instance Methods
to_html(doc)
click to toggle source
Generate the HTML code to that describes the foot section. @param doc [HTMLBuilder] Reference to the HTML document to add to.
# File lib/postrunner/ViewBottom.rb, line 23 def to_html(doc) doc.unique(:viewbottom_style) { doc.head { doc.style(style) } } doc.div({ :class => 'footer' }){ doc.hr doc.div({ :class => 'copyright' }) { doc.text("Generated by ") doc.a('PostRunner', { :href => 'https://github.com/scrapper/postrunner' }) doc.text(" #{VERSION} on #{Time.now}") } } end
Private Instance Methods
style()
click to toggle source
# File lib/postrunner/ViewBottom.rb, line 40 def style <<EOT .footer { clear: both; width: 100%; height: 30px; padding: 15px 0px; text-align: center; font-size: 9pt; } EOT end