Sha256: b09ee52f1fccee5ec78c57ad37c018ccbe3804fb45103d277c8afb1e1c4fce30

Contents?: true

Size: 379 Bytes

Versions: 5

Compression:

Stored size: 379 Bytes

Contents

module Amakanize
  module Filters
    class SpacesBetweenExclamationsDeletionFilter < 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/spaces_between_exclamations_deletion_filter.rb
amakanize-0.5.3 lib/amakanize/filters/spaces_between_exclamations_deletion_filter.rb
amakanize-0.5.2 lib/amakanize/filters/spaces_between_exclamations_deletion_filter.rb
amakanize-0.5.1 lib/amakanize/filters/spaces_between_exclamations_deletion_filter.rb
amakanize-0.5.0 lib/amakanize/filters/spaces_between_exclamations_deletion_filter.rb