Module: TimeWindowDropCollector::Config
- Defined in:
- lib/time_window_drop_collector/config.rb
Class Method Summary collapse
- .client(type, opts = nil) ⇒ Object
- .extract(block) ⇒ Object
- .slices(num) ⇒ Object
- .window(seconds) ⇒ Object
Class Method Details
.client(type, opts = nil) ⇒ Object
8 9 10 11 |
# File 'lib/time_window_drop_collector/config.rb', line 8 def self.client( type, opts=nil ) @opts[:client] = type @opts[:client_opts] = opts end |
.extract(block) ⇒ Object
2 3 4 5 6 |
# File 'lib/time_window_drop_collector/config.rb', line 2 def self.extract( block ) @opts = {} instance_eval( &block ) @opts end |
.slices(num) ⇒ Object
17 18 19 |
# File 'lib/time_window_drop_collector/config.rb', line 17 def self.slices( num ) @opts[:slices] = num end |
.window(seconds) ⇒ Object
13 14 15 |
# File 'lib/time_window_drop_collector/config.rb', line 13 def self.window( seconds ) @opts[:window] = seconds end |