Sha256: 4bf6906c68f0d01298f567b40e2689902aac0773f9cb89fbb8acb7b52f020bf6

Contents?: true

Size: 529 Bytes

Versions: 5

Compression:

Stored size: 529 Bytes

Contents

module Amakanize
  module Filters
    class SpaceBetweenExclamationAndBracketDeletionFilter < BaseFilter
      # @note Override
      # @param output [String] e.g. `"まおゆう魔王勇者 「この我のものとなれ、勇者よ」「断る! 」"`
      # @return [Hash] e.g. `"まおゆう魔王勇者 「この我のものとなれ、勇者よ」「断る!」"`
      def call(context:, output:)
        {
          context: context,
          output: output.gsub(/!\s+」/, "!」"),
        }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
amakanize-0.6.0 lib/amakanize/filters/space_between_exclamation_and_bracket_deletion_filter.rb
amakanize-0.5.3 lib/amakanize/filters/space_between_exclamation_and_bracket_deletion_filter.rb
amakanize-0.5.2 lib/amakanize/filters/space_between_exclamation_and_bracket_deletion_filter.rb
amakanize-0.5.1 lib/amakanize/filters/space_between_exclamation_and_bracket_deletion_filter.rb
amakanize-0.5.0 lib/amakanize/filters/space_between_exclamation_and_bracket_deletion_filter.rb