Sha256: 7dff2379ccbbbecef9b2cf34d122daa9b5551cf8cd03cc9f898e585866926154
Contents?: true
Size: 357 Bytes
Versions: 33
Compression:
Stored size: 357 Bytes
Contents
module Octopolo class SemverTagScrubber def self.scrub_prefix(tag) scrub_via_regexp(tag, /\A[a-z]*/i) end def self.scrub_suffix(tag) scrub_via_regexp(tag, /[a-z]*\z/i) end private def self.scrub_via_regexp(tag, regexp) result = tag.match(regexp)[0] tag.gsub!(regexp, '') result end end end
Version data entries
33 entries across 33 versions & 1 rubygems