Sha256: a82b3e4be217e9aa52c2cced8ef7da3c04ae93316735eb31e26bbedbc24662f7

Contents?: true

Size: 514 Bytes

Versions: 5

Compression:

Stored size: 514 Bytes

Contents

module PivotalToPdf
  class Text
    class << self
      def formatting_classes
        [ TextFormatters::SimpleMarkup ]
      end
    end

    attr_reader :string
    protected :string

    def initialize(string)
      @string = string
    end

    def ==(other)
      string == other.string
    end

    def hash
      string.hash
    end

    def to_s
      output = string
      self.class.formatting_classes.each do |klass|
        output = klass.new(output).output
      end
      output
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pivotal_to_pdf-1.6.0 lib/pivotal_to_pdf/text.rb
pivotal_to_pdf-1.4.0 lib/pivotal_to_pdf/text.rb
pivotal_to_pdf-1.3.4 lib/pivotal_to_pdf/text.rb
pivotal_to_pdf-1.3.3 lib/pivotal_to_pdf/text.rb
pivotal_to_pdf-1.3.2 lib/pivotal_to_pdf/text.rb