Sha256: 999fa2f3501df412b9ae1c7d6b1d535cce35b7781530d4003e8ebf30dfbd6ede

Contents?: true

Size: 534 Bytes

Versions: 1

Compression:

Stored size: 534 Bytes

Contents

require 'gollum-lib'
require 'grit'
require 'ruby-progressbar'

module Caramelize
  class FilterProcessor
    attr_reader :filters, :input_wiki

    def initialize(input_wiki)
      @filters = []
      @input_wiki = input_wiki

      initialize_wiki_filters
    end

    def run(body)
      body_new = body
      filters.each do |filter|
        body_new = filter.run(body_new)
      end
      body_new
    end

    private

    def initialize_wiki_filters
      filters << input_wiki.filters
      filters.flatten!
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caramelize-0.4.0 lib/caramelize/filter_processor.rb