Sha256: 40c9e3ee33c0debbc2b0a883b7b3dbdf876e6e97fecc90942441957221cf2cc8

Contents?: true

Size: 237 Bytes

Versions: 8

Compression:

Stored size: 237 Bytes

Contents

require 'htmlentities'
#
module SourceString
  refine String do
    def decode_html
      HTMLEntities.new.decode(self)
    end

    def encode_utf8_and_replace
      encode('UTF-8', invalid: :replace, undef: :replace)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rubyretriever-1.4.6 lib/retriever/core_ext.rb
rubyretriever-1.4.5 lib/retriever/core_ext.rb
rubyretriever-1.4.4 lib/retriever/core_ext.rb
rubyretriever-1.4.3 lib/retriever/core_ext.rb
rubyretriever-1.4.2 lib/retriever/core_ext.rb
rubyretriever-1.4.1 lib/retriever/core_ext.rb
rubyretriever-1.4.0 lib/retriever/core_ext.rb
rubyretriever-1.3.0 lib/retriever/core_ext.rb