lib/elegant/footer.rb in elegant-1.1.0 vs lib/elegant/footer.rb in elegant-1.2.0
- old
+ new
@@ -3,11 +3,11 @@
class Footer
include Prawn::View
def initialize(document, options = {})
@document = document
- @text, @url = options.values_at :text, :url
+ @text = options[:text]
end
# Draws in the header of each page a horizontal line, the name of the
# author, the title and the page number. The author must be provided in
# the configuration, and the title when initializing the document.
@@ -26,16 +26,15 @@
options = {at: [0, -6], width: 50, height: 10, size: 7, valign: :top}
text_box Elegant.configuration.author, options
end
def render_text
- text = @url ? "<link href='#{@url}'>#{@text}</link>" : @text
left = 50
options = {size: 7, align: :center, valign: :top, inline_format: true}
options[:at] = [left, -6]
options[:width] = bounds.width - 2 * left
options[:height] = 10
- text_box text, options
+ text_box @text, options
end
def render_page_number
options = {width: 50, height: 10, size: 7, align: :right, valign: :top}
options[:at] = [bounds.width - options[:width], -6]