class Stormy::Layout

Public Class Methods

fetch(app,key,params) click to toggle source
# File lib/stormy/layout.rb, line 12
def self.fetch(app,key,params)
  details = app.cache.layout(key) do 
    app.store.layout(key)
  end

  self.new(app,details,params)
end

Public Instance Methods

render(child_template) click to toggle source
# File lib/stormy/layout.rb, line 3
def render(child_template)
  raise "No Matching Template: #{@key}" unless @template
  output = child_template.render
  @details.merge!(child_template.details)
  @template.render do |section=nil|
    output
  end
end