Sha256: b6f509c402fd567501d75be43966bde189dee572042ccf178546999eea93e688

Contents?: true

Size: 465 Bytes

Versions: 5

Compression:

Stored size: 465 Bytes

Contents

class Logasm
  module Preprocessors
    def self.get(type, arguments)
      preprocessor =
        case type.to_s
        when 'blacklist'
          require_relative 'preprocessors/blacklist'
          Preprocessors::Blacklist
        when 'whitelist'
          require_relative 'preprocessors/whitelist'
          Preprocessors::Whitelist
        else
          raise "Unknown preprocessor: #{type}"
        end
      preprocessor.new(arguments)
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
logasm-jruby-1.2.1 lib/logasm/preprocessors.rb
logasm-1.2.1 lib/logasm/preprocessors.rb
logasm-jruby-1.2.0 lib/logasm/preprocessors.rb
logasm-1.2.0 lib/logasm/preprocessors.rb
logasm-1.1.0 lib/logasm/preprocessors.rb