Sha256: 6e506dcfd351f19fc0b8fa0c56275055ffb676ece09f375a96ab4a02172c9afe

Contents?: true

Size: 772 Bytes

Versions: 34

Compression:

Stored size: 772 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class ContentParsers::DummyFooParser < ContentParsers::BaseParser
    def rewrite
      content.gsub("foo", "*lorem*")
    end

    def metadata
      content.scan("foo").size
    end
  end

  class ContentRenderers::DummyFooRenderer < ContentRenderers::BaseRenderer
    def render
      content.gsub("*lorem*", "<em>neque dicta enim quasi</em>")
    end
  end

  class ContentParsers::DummyBarParser < ContentParsers::BaseParser
    def rewrite
      content.gsub("bar", "*ipsum*")
    end

    def metadata
      content.scan("bar").size
    end
  end

  class ContentRenderers::DummyBarRenderer < ContentRenderers::BaseRenderer
    def render
      content.gsub("*ipsum*", "<em>illo qui voluptas</em>")
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
decidim-dev-0.20.1 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.20.0 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.19.1 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.18.1 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.19.0 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.17.2 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.18.0 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.17.1 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.16.1 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.17.0 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.16.0 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.15.2 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.15.1 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.15.0 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.14.4 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.14.3 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.14.2 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.14.1 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.13.1 lib/decidim/dev/test/rspec_support/content_processing.rb
decidim-dev-0.12.2 lib/decidim/dev/test/rspec_support/content_processing.rb