Sha256: 40753de039f869fb4d42cd8e384177a3baef1c57bde630ffca56c71d46b43093
Contents?: true
Size: 403 Bytes
Versions: 7
Compression:
Stored size: 403 Bytes
Contents
module Amakanize module Filters class RoleNameDeletionFilter < BaseFilter ROLE_NAMES = %w( 原作 原案 漫画 ) # @note Override # @param string [String] e.g. `"漫画:ハノカゲ"` # @return [String] e.g. `"ハノカゲ"` def call(string) string.gsub(%r<\A#{::Regexp.union(ROLE_NAMES)}[:/]>, "") end end end end
Version data entries
7 entries across 7 versions & 1 rubygems