Class: Faye::Namespace

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/faye/util/namespace.rb

Instance Method Summary collapse

Constructor Details

#initializeNamespace

Returns a new instance of Namespace.


8
9
10
# File 'lib/faye/util/namespace.rb', line 8

def initialize
  @used = {}
end

Instance Method Details

#generateObject


12
13
14
15
16
# File 'lib/faye/util/namespace.rb', line 12

def generate
  name = Engine.random
  name = Engine.random while @used.has_key?(name)
  @used[name] = name
end