Sha256: 262c8389a82bec4160109e8a5ee57bf23e9655ae8beb7a7aae78acd163bee84c
Contents?: true
Size: 342 Bytes
Versions: 11
Compression:
Stored size: 342 Bytes
Contents
module Relevance module Tarantula class Transform attr_accessor :from, :to def initialize(from, to) @from = from @to = to end def [](string) case to when Proc string.gsub(from, &to) else string.gsub(from, to) end end end end end
Version data entries
11 entries across 11 versions & 2 rubygems