class EmlToPdf::Configuration

Attributes

cc_label[RW]
date_label[RW]
from_label[RW]
timeout[RW]
to_label[RW]
wkhtmltopdf[RW]

Public Class Methods

new() click to toggle source
# File lib/eml_to_pdf/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") }
  @wkhtmltopdf = 'wkhtmltopdf'
  @timeout = 0
end

Public Instance Methods

date_format(&block) click to toggle source
# File lib/eml_to_pdf/configuration.rb, line 15
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/configuration.rb, line 23
def format_date(date)
  @date_format.call(date)
end