Sha256: 39791e157fa3ec24fa014842e3808278ff7141430a9ab94b16723d034ed946f2
Contents?: true
Size: 552 Bytes
Versions: 6
Compression:
Stored size: 552 Bytes
Contents
require "amakanize/filters/base_filter" module Amakanize module Filters class TrailingSeriesNamePayloadDeletionFilter < ::Amakanize::Filters::BaseFilter PAYLOADS = %w( 通常版 (未分類) ) # @note Override # @param output [String] e.g. `"魔法使いの嫁 通常版"` # @return [Hash] e.g. `"魔法使いの嫁"` def call(context:, output:) { context: context, output: output.gsub(/\s+#{::Regexp.union(PAYLOADS)}\z/, ""), } end end end end
Version data entries
6 entries across 6 versions & 1 rubygems