class Tigefa::Tags::PostUrl
Public Class Methods
new(tag_name, post, tokens)
click to toggle source
Calls superclass method
# File lib/tigefa/tags/post_url.rb, line 38 def initialize(tag_name, post, tokens) super @orig_post = post.strip @post = PostComparer.new(@orig_post) end
Public Instance Methods
render(context)
click to toggle source
# File lib/tigefa/tags/post_url.rb, line 44 def render(context) site = context.registers[:site] site.posts.each do |p| if @post == p return p.url end end puts "ERROR: post_url: \"#{@orig_post}\" could not be found" return "#" end