Class: WindUp::Router::Random

Inherits:
Base
  • Object
show all
Defined in:
lib/wind_up/routers.rb

Overview

Randomly route messages to workers

Instance Method Summary collapse

Methods inherited from Base

#<<, #add_subscriber, #broadcast, #initialize, #remove_subscriber, #send_message, #subscribers

Constructor Details

This class inherits a constructor from WindUp::Router::Base

Instance Method Details

#next_subscriberObject



83
84
85
# File 'lib/wind_up/routers.rb', line 83

def next_subscriber
  subscribers.sample
end