class Tumblargh::Renderer::Blocks::Posts
Posts
Loop
{block:Posts} is executed once for each post. Some post related tags can exist outside of a `type` block, such as {Title} or {Permalink}, so they should be defined here
Public Instance Methods
permalink()
click to toggle source
# File lib/tumblargh/renderer/blocks/posts.rb, line 16 def permalink url = context.post_url url.gsub(/^http:\/\/[^\/]+/, '') end
permalink?()
click to toggle source
# File lib/tumblargh/renderer/blocks/posts.rb, line 21 def permalink? context.permalink? end
post_notes_url()
click to toggle source
# File lib/tumblargh/renderer/blocks/posts.rb, line 25 def post_notes_url # http://bikiniatoll.tumblr.com/notes/1377511430/vqS0xw8sm "/notes/#{context.id}/" end
reblog_url()
click to toggle source
# File lib/tumblargh/renderer/blocks/posts.rb, line 30 def reblog_url "/reblog/#{context.reblog_key}" end
render()
click to toggle source
Calls superclass method
Tumblargh::Renderer::Blocks::Base#render
# File lib/tumblargh/renderer/blocks/posts.rb, line 50 def render if context.is_a? Resource::Post super else posts = permalink? ? [context.posts.first] : context.posts posts.map do |post| post.context = self self.class.new(node, post).render end.flatten.join('') end end