Sha256: b6d8d2d8231471d7f0a8cef7b626ca4d9a6568a3775d994cd2f15b349a1ab77b
Contents?: true
Size: 771 Bytes
Versions: 9
Compression:
Stored size: 771 Bytes
Contents
module Amakanize class AuthorName class << self # @return [Array<Amakan::Filters::BaseFilter>] def filters @filters ||= [ ::Amakanize::Filters::HtmlUnescapeFilter.new, ::Amakanize::Filters::NormalizationFilter.new, ::Amakanize::Filters::ParenthesesDeletionFilter.new, ::Amakanize::Filters::RoleNameDeletionFilter.new, ::Amakanize::Filters::TrailingAuthorNamePayloadDeletionFilter.new, ::Amakanize::Filters::SpaceDeletionFilter.new, ] end end # @param raw [String] def initialize(raw) @raw = raw end # @note Override def to_s self.class.filters.inject(@raw) do |result, filter| filter.call(result) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems