class Templet::Component::Layout
For composing views - the first step
Public Class Methods
call(*contexts, **locals, &block)
click to toggle source
# File lib/templet/component/layout.rb, line 14 def self.call(*contexts, **locals, &block) new(*contexts, **locals).(&block) end
new(*contexts, **locals)
click to toggle source
contexts
-
A list containing objects whose methods will be looked up
locals
-
Objects you can reference by the given name
# File lib/templet/component/layout.rb, line 8 def initialize(*contexts, **locals) contexts = [ self, *contexts ] self.renderer = Renderer.new(*contexts, **locals) end