Method: Witch.init
- Defined in:
- lib/witch.rb
.init(options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/witch.rb', line 10 def init( = {}) raise 'Already initialized!' if @queue @queue = .delete(:queue) || 'eventstream' @logger = .delete(:logger) = @callbacks = {:once => {}, :on => {}} @channels = [] @thread = nil @id = Socket.gethostname + '-' + $$.to_s end |