class Ducktrails::Tag
Public Class Methods
new(template, options = {})
click to toggle source
# File lib/ducktrails/tags.rb, line 5 def initialize(template, options = {}) @template = template @options = options.dup @params = template @views_prefix = @options.delete(:views_prefix) end
Public Instance Methods
partial_path()
click to toggle source
# File lib/ducktrails/tags.rb, line 16 def partial_path [ Ducktrails.config.theme, self.class.name.demodulize.underscore ].compact.join("/") end
to_s(locals = {})
click to toggle source
# File lib/ducktrails/tags.rb, line 12 def to_s(locals = {}) @template.render partial_path, links: locals[:links] end