Sha256: 417d4436288b8231c64ab308238818db7fecb41b9b143760f8f747e124625907

Contents?: true

Size: 420 Bytes

Versions: 16

Compression:

Stored size: 420 Bytes

Contents

module Amakanize
  module Filters
    class TrailingParenthesesDeletionFilter < BaseFilter
      # @note Override
      # @param string [String] e.g. `"魔法使いの嫁 通常版 4 (BLADE COMICS)"`
      # @return [String] e.g. `"魔法使いの嫁 通常版 4"`
      def call(string)
        string.gsub(/\s*[\((〈《【「『【[\[〔{\{«‹〘〚].*/, "").gsub(/\s*~.+~\z/, "")
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
amakanize-0.2.2 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.2.1 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.2.0 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.1.12 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.1.11 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.1.10 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.1.9 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.1.8 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.1.7 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.1.6 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.1.5 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.1.4 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.1.3 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.1.2 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.1.1 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb
amakanize-0.1.0 lib/amakanize/filters/trailing_parentheses_deletion_filter.rb