Sha256: 8a343bb39ad68b1d6f87426ebdfe03f30b573f5cd5cc73780e419720bdac5a14

Contents?: true

Size: 556 Bytes

Versions: 16

Compression:

Stored size: 556 Bytes

Contents

module HtmlEmailCreator
  module Formatters
    class Formatter      
      def self.id
        raise "id needs to be defined"
      end

      def self.extension
        raise "extension needs to be defined"
      end
      
      def initialize(text, settings)
        @text = text
        @settings = settings
      end
      
      # override to implement a correct formatter
      def format
        @text
      end
      
      def id
        self.class.id
      end
      
      def extension
        self.class.extension
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
html_email_creator-1.0.18 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.16 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.15 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.14 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.13 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.10 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.9 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.8 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.7 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.6 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.5 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.4 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.3 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.2 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.1 lib/html_email_creator/formatters/formatter.rb
html_email_creator-1.0.0 lib/html_email_creator/formatters/formatter.rb