class Bookwatch::Subnav::TemplateCreator::LinkHolder
Attributes
links[R]
Public Class Methods
new(links, template)
click to toggle source
# File lib/bookwatch/subnav/template_creator.rb, line 42 def initialize(links, template) @links = links @template = template end
Public Instance Methods
escape_html(str)
click to toggle source
# File lib/bookwatch/subnav/template_creator.rb, line 65 def escape_html(str) Rack::Utils.escape_html(str) end
get_binding()
click to toggle source
# File lib/bookwatch/subnav/template_creator.rb, line 49 def get_binding binding end
links?(links)
click to toggle source
# File lib/bookwatch/subnav/template_creator.rb, line 61 def links?(links) (links || []).empty? end
render_links(some_links)
click to toggle source
# File lib/bookwatch/subnav/template_creator.rb, line 53 def render_links(some_links) @template.result(LinkHolder.new(some_links, @template).get_binding) end