Module: Lenjador::Preprocessors

Defined in:
lib/lenjador/preprocessors.rb,
lib/lenjador/preprocessors/blacklist.rb,
lib/lenjador/preprocessors/whitelist.rb,
lib/lenjador/preprocessors/strategies/mask.rb,
lib/lenjador/preprocessors/strategies/prune.rb,
lib/lenjador/preprocessors/json_pointer_trie.rb

Defined Under Namespace

Modules: Strategies Classes: Blacklist, JSONPointerTrie, Whitelist

Class Method Summary collapse

Class Method Details

.get(type, arguments) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/lenjador/preprocessors.rb', line 5

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