Module: Pancake::Mixins::Render

Defined in:
lib/pancake/mixins/render.rb,
lib/pancake/mixins/render/template.rb,
lib/pancake/mixins/render/view_context.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods Classes: Template, TemplateNotFound, ViewContext

Constant Summary collapse

RENDER_SETUP =
lambda do |base|
  base.class_eval do
    extend  Pancake::Mixins::Render::ClassMethods
    include Pancake::Mixins::Render::InstanceMethods

    class base::ViewContext < Pancake::Mixins::Render::ViewContext; end

    inheritable_inner_classes :ViewContext

    unless ancestors.include?(Pancake::Paths)
      extend Pancake::Paths
    end
  end
end

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



23
24
25
# File 'lib/pancake/mixins/render.rb', line 23

def self.included(base)
  RENDER_SETUP.call(base)
end