Class: Lhm::Throttler::Factory
- Inherits:
-
Object
- Object
- Lhm::Throttler::Factory
- Defined in:
- lib/lhm/throttler.rb
Class Method Summary collapse
Class Method Details
.create_throttler(type, options = {}) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/lhm/throttler.rb', line 25 def self.create_throttler(type, = {}) case type when Lhm::Command type when Symbol CLASSES[type].new() when String CLASSES[type.to_sym].new() when Class type.new() else raise ArgumentError, 'type argument must be a Symbol, String or Class' end end |