class EmlToPdfExt::Configuration

Attributes

cc_label[RW]
date_label[RW]
from_label[RW]
metadata_visible[RW]
to_label[RW]

Public Class Methods

new() click to toggle source
# File lib/eml_to_pdf_ext/configuration.rb, line 5
def initialize
  @from_label = 'From'
  @to_label = 'To'
  @cc_label = 'Cc'
  @date_label = 'Date'
  @date_format = lambda { |date| date.strftime('%Y-%m-%d %H:%M:%S %z') }
  @metadata_visible = true
  @links_enabled = true
  @link_format_whitelist = []
end

Public Instance Methods

date_format(&block) click to toggle source
# File lib/eml_to_pdf_ext/configuration.rb, line 16
def date_format(&block)
  if block_given?
    @date_format = block
  else
    @date_format
  end
end
format_date(date) click to toggle source
# File lib/eml_to_pdf_ext/configuration.rb, line 24
def format_date(date)
  @date_format.call(date)
end