Module: ExpressTemplates::Components::Capabilities::Templating

Included in:
Base
Defined in:
lib/express_templates/components/capabilities/templating.rb

Overview

The Templating capability module provides Components with the ability to store, reference and compile template fragments.

It extends the including class with Templating::ClassMethods.

It also provides helpers which are snippets of code in the form of lambdas that may be evaluated in the view context.

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/express_templates/components/capabilities/templating.rb', line 14

def self.included(base)
  base.class_eval do
    extend ClassMethods
    include InstanceMethods
  end
  class << base
    alias_method :fragments, :emits
    alias_method :has_markup, :emits
  end
end