Sha256: ea6c0a1558714c5f207d655f3ff9c88a1f47773a7b6030520839dd33e09da6a2
Contents?: true
Size: 413 Bytes
Versions: 10
Compression:
Stored size: 413 Bytes
Contents
module LogCabin module Modules ## # Use regex to adjust state value module Regex def regex_helper(value) return value unless @find fail("Value does not match regex: #{value}") unless value.match(@find) value.sub(@find, @replace) end private def regex(find, replace = '\1') @find = find @replace = replace end end end end
Version data entries
10 entries across 10 versions & 1 rubygems