Sha256: 222c517137e02ca16c7172f9f5b017d5a44d4d4692744f035793e3c838b553c3

Contents?: true

Size: 379 Bytes

Versions: 5

Compression:

Stored size: 379 Bytes

Contents

require "amakanize/filters/base_filter"

module Amakanize
  module Filters
    class TrailingSymbolDeletionFilter < ::Amakanize::Filters::BaseFilter
      PATTERN = /\s*[-:]\z/

      # @note Override
      def call(context:, output:)
        output = output.gsub(PATTERN, "")
        {
          context: context,
          output: output,
        }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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