Class: Stencil::End

Inherits:
Directive show all
Defined in:
lib/stencil/directives/base.rb

Instance Method Summary collapse

Methods inherited from Directive

#checked_render, create, #initialize, #inspect, #inspect_args, #interpret, #postrender, #pre_end, #prerender, register, #render, #render_end

Constructor Details

This class inherits a constructor from Stencil::Directive

Instance Method Details

#parsed(stack) ⇒ Object



329
330
331
332
333
# File 'lib/stencil/directives/base.rb', line 329

def parsed(stack)
  @count.times do
    stack.last.ended(stack)
  end
end

#setup_parameters(arg) ⇒ Object



323
324
325
326
327
# File 'lib/stencil/directives/base.rb', line 323

def setup_parameters(arg)
  @ended = nil
  @count = arg.to_i
  @count = 1 if @count < 1
end