Parent

Methods

Files

Jekyll::Tags::PostUrl

Public Class Methods

new(tag_name, post, tokens) click to toggle source
# File lib/jekyll/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/jekyll/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

[Validate]

Generated with the Darkfish Rdoc Generator 2.