class Caracal::Header

Public Class Methods

new() click to toggle source
# File lib/caracal/header.rb, line 44
def initialize
  page_size
  page_margins top: 1440, bottom: 1440, left: 1440, right: 1440

  [:font, :list_style, :namespace, :style].each do |method|
    collection = self.class.send("default_#{ method }s")
    collection.each do |item|
      send(method, item)
    end
  end
end

Public Instance Methods

contents() click to toggle source
# File lib/caracal/header.rb, line 56
def contents
  @contents ||= []
end
contents_for(position) click to toggle source
# File lib/caracal/header.rb, line 60
def contents_for(position)
  contents.select { |model| model.alignment == position }
end