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
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/lhm/throttler.rb', line 16 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 |