Sha256: 97f74c95693038fac2a0d853d39e5adb41fa7b3a9797322fb49365aa387314db
Contents?: true
Size: 609 Bytes
Versions: 3
Compression:
Stored size: 609 Bytes
Contents
module CrazyHarry class Base include CrazyHarry::Default include CrazyHarry::Change include CrazyHarry::Redact include CrazyHarry::Translate attr_accessor :fragment, :scope, :steps, :text def initialize(opts = {}) self.fragment = Loofah.fragment(opts.delete(:fragment)) if opts.has_key?(:fragment) self.steps = [] end def to_s self.fragment.to_s.squeeze(' ').strip end private def run! steps.compact.delete_if do |step| if steps.size > 0 fragment.scrub!(step) true end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
crazy_harry-0.1.0 | lib/crazy_harry/base.rb |
crazy_harry-0.0.4 | lib/crazy_harry/base.rb |
crazy_harry-0.0.3 | lib/crazy_harry/base.rb |