Sha256: bfa304b13d9281155324f469c9d7731f3beeefb3cfb84886734d62f104b3ff80

Contents?: true

Size: 245 Bytes

Versions: 2

Compression:

Stored size: 245 Bytes

Contents

 # Marks all blocks as content.

module Boilerpipe::Filters
  class MarkEverythingContentFilter

    def self.process(doc)
      doc.text_blocks.each do |tb|
        tb.content = true if tb.is_not_content?
      end
      doc
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
boilerpipe-ruby-0.4.0 lib/boilerpipe/filters/mark_everything_content_filter.rb
boilerpipe-ruby-0.3.0 lib/boilerpipe/filters/mark_everything_content_filter.rb