Class: Tzispa::Engine::Rig::Layout

Inherits:
Controller::Http show all
Includes:
Helpers::Response
Defined in:
lib/tzispa/engine/rig/layout.rb

Direct Known Subclasses

AuthLayout

Instance Attribute Summary

Attributes inherited from Controller::Http

#custom_errors

Attributes inherited from Controller::Base

#application, #callmethod, #context, #context_class

Instance Method Summary collapse

Methods inherited from Controller::Http

#call

Methods inherited from Controller::Base

#call

Constructor Details

#initialize(app) ⇒ Layout

Returns a new instance of Layout.



16
17
18
# File 'lib/tzispa/engine/rig/layout.rb', line 16

def initialize(app)
  super app, :render!, Tzispa::Engine::Rig::Context, true
end

Instance Method Details

#render!Object



20
21
22
23
24
25
# File 'lib/tzispa/engine/rig/layout.rb', line 20

def render!
  layout_template.tap do |rig|
    response.body << rig.render(context)
    content_type rig.content_type
  end
end