Sha256: 13b1cf2cdb276ff23e52c6a9e640cd80212136ec05c5e3acd009cd15ebc1429f
Contents?: true
Size: 250 Bytes
Versions: 2
Compression:
Stored size: 250 Bytes
Contents
require 'html_truncator' module CrazyHarry module Truncate def truncate!(count, opts = {}) truncated = HTML_Truncator.truncate(self.fragment.to_s, count, opts) self.fragment = Loofah.fragment(truncated) self end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
crazy_harry-0.2.1 | lib/crazy_harry/truncate.rb |
crazy_harry-0.2.0 | lib/crazy_harry/truncate.rb |