Module: Caracal::Core::Header

Included in:
Document
Defined in:
lib/caracal/core/header.rb

Overview

This module encapsulates all the functionality related to adding a header to every page of the document.

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/caracal/core/header.rb', line 12

def self.included(base)
  base.class_eval do

    #-------------------------------------------------------------
    # Public Methods
    #-------------------------------------------------------------

    def header(*args, &block)
      options = Caracal::Utilities.extract_options!(args)

      model = Caracal::Core::Models::HeaderModel.new(options, &block)

      @header_content = model

      model
    end
  end
end