class Tumblargh::Renderer::Blocks::NumberedPost

Attributes

num[R]

Public Class Methods

new(node, context, *args) click to toggle source
Calls superclass method Tumblargh::Renderer::Base::new
# File lib/tumblargh/renderer/blocks.rb, line 16
def initialize(node, context, *args)
  @num = args[0]
  super(node, context)
end

Public Instance Methods

should_render?() click to toggle source
# File lib/tumblargh/renderer/blocks.rb, line 21
def should_render?
  num == context.posts.index(context_post) + 1
end