Sha256: ac879d64b7a6637bfd32fdde571a965589bcf9908ba133b15069f782798e50ec
Contents?: true
Size: 203 Bytes
Versions: 2
Compression:
Stored size: 203 Bytes
Contents
class String def filter_prefix prefix self.starts_with?(prefix) ? self[prefix.to_s.length, self.length] : self end def filter_prefix! prefix self.slice! Regexp.new "^#{prefix}" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
programmable-ventouse-0.1.1 | lib/ventouse/filter_prefix.rb |
programmable-ventouse-0.1.2 | lib/ventouse/filter_prefix.rb |