Sha256: e0fef49b39d2bab28693ae039c7843c16783e18caeb71c5735ebe41912e7b222

Contents?: true

Size: 442 Bytes

Versions: 6

Compression:

Stored size: 442 Bytes

Contents

require "amakanize/filters/base_filter"

module Amakanize
  module Filters
    class SpacesBetweenExclamationsDeletionFilter < ::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/spaces_between_exclamations_deletion_filter.rb
amakanize-0.6.5 lib/amakanize/filters/spaces_between_exclamations_deletion_filter.rb
amakanize-0.6.4 lib/amakanize/filters/spaces_between_exclamations_deletion_filter.rb
amakanize-0.6.3 lib/amakanize/filters/spaces_between_exclamations_deletion_filter.rb
amakanize-0.6.2 lib/amakanize/filters/spaces_between_exclamations_deletion_filter.rb
amakanize-0.6.1 lib/amakanize/filters/spaces_between_exclamations_deletion_filter.rb