Sha256: a39133d9514eedaf652d688ec1a3b4ccbaff1f821cab4f3e7c72c3f9dc2529a8
Contents?: true
Size: 646 Bytes
Versions: 3
Compression:
Stored size: 646 Bytes
Contents
module EmlToPdf class Configuration attr_accessor :from_label, :to_label, :cc_label, :date_label, :metadata_visible, :links_enabled, :link_format_whitelist def initialize @from_label, @to_label, @cc_label, @date_label= 'From', 'To', 'Cc', 'Date' @date_format = lambda { |date| date.strftime('%Y-%m-%d %H:%M:%S %z') } @metadata_visible = true @links_enabled = true @link_format_whitelist = [] end def date_format(&block) if block_given? @date_format = block else @date_format end end def format_date(date) @date_format.call(date) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
eml_to_pdf_ext-0.5.8 | lib/eml_to_pdf/configuration.rb |
eml_to_pdf_ext-0.5.7 | lib/eml_to_pdf/configuration.rb |
eml_to_pdf_ext-0.5.6 | lib/eml_to_pdf/configuration.rb |