Sha256: c6b78566a4825b3125845ed32dd7cfb3ff246343e8acf108fe7158202f9a0522

Contents?: true

Size: 380 Bytes

Versions: 5

Compression:

Stored size: 380 Bytes

Contents

module Amakanize
  module Filters
    class DashBetweenAlhabetsNormalizationFilter < BaseFilter
      # @note Override
      # @param output [String] e.g. `"D.Grayーman"`
      # @return [Hash] e.g. `"D.Gray-man"`
      def call(context:, output:)
        {
          context: context,
          output: output.gsub(/(\w)ー(\w)/, '\1-\2'),
        }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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