Sha256: 566110a4518fc9b6fe4219f566bbaa8ba7fb2ea484a256227b77c7b38f3902ed

Contents?: true

Size: 592 Bytes

Versions: 6

Compression:

Stored size: 592 Bytes

Contents

require "amakanize/filters/base_filter"

module Amakanize
  module Filters
    class SpaceBetweenExclamationAndBracketDeletionFilter < ::Amakanize::Filters::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

6 entries across 6 versions & 1 rubygems

Version Path
amakanize-0.7.0 lib/amakanize/filters/space_between_exclamation_and_bracket_deletion_filter.rb
amakanize-0.6.5 lib/amakanize/filters/space_between_exclamation_and_bracket_deletion_filter.rb
amakanize-0.6.4 lib/amakanize/filters/space_between_exclamation_and_bracket_deletion_filter.rb
amakanize-0.6.3 lib/amakanize/filters/space_between_exclamation_and_bracket_deletion_filter.rb
amakanize-0.6.2 lib/amakanize/filters/space_between_exclamation_and_bracket_deletion_filter.rb
amakanize-0.6.1 lib/amakanize/filters/space_between_exclamation_and_bracket_deletion_filter.rb