module Padrino::Helpers::OutputHelpers

def content_for(key, content = nil, &block)

Other tags:
    Api: - public

Parameters:
  • block (Proc) -- Block to be stored as content for this key.
  • key (Symbol) -- Name of your key for the content yield.
  • content (String) -- Text to be stored for this key.
  • key (Symbol) -- Name of your key for the content yield.

Overloads:
  • content_for(key, &block)
  • content_for(key, content)
def content_for(key, content = nil, &block)
  content_blocks[key.to_sym] << (block_given? ? block : Proc.new { content })
end