Sha256: 9f79dc31a09d6dd24146e80a7041413ebf78f45609cc6f50d6a99a4d2d11ca8f

Contents?: true

Size: 341 Bytes

Versions: 44

Compression:

Stored size: 341 Bytes

Contents

# encoding: utf-8
module Prismic
  module Fragments
    class Text < Fragment
      attr_accessor :value

      def initialize(value)
        @value = value
      end

      def as_html(link_resolver=nil)
        %(<span class="text">#{CGI::escapeHTML(@value)}</span>)
      end

      def as_text
        @value
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
prismic.io-1.8.2 lib/prismic/fragments/text.rb
prismic.io-1.8.1 lib/prismic/fragments/text.rb
prismic.io-1.8.0 lib/prismic/fragments/text.rb
prismic.io-1.7.0 lib/prismic/fragments/text.rb
prismic.io-1.6.1 lib/prismic/fragments/text.rb
prismic.io-1.6.0 lib/prismic/fragments/text.rb
prismic.io-1.5.0 lib/prismic/fragments/text.rb
prismic.io-1.4.5 lib/prismic/fragments/text.rb
prismic.io-1.4.4 lib/prismic/fragments/text.rb
prismic.io-1.4.3 lib/prismic/fragments/text.rb
prismic.io-1.4.2 lib/prismic/fragments/text.rb
prismic.io-1.4.1 lib/prismic/fragments/text.rb
prismic.io-1.4.0 lib/prismic/fragments/text.rb
prismic.io-1.3.5 lib/prismic/fragments/text.rb
prismic.io-1.3.4 lib/prismic/fragments/text.rb
prismic.io-1.3.3 lib/prismic/fragments/text.rb
prismic.io-1.3.2 lib/prismic/fragments/text.rb
prismic.io-1.3.1 lib/prismic/fragments/text.rb
prismic.io-1.3.0 lib/prismic/fragments/text.rb
prismic.io-1.2.1 lib/prismic/fragments/text.rb