Module: FayeRails

Defined in:
lib/faye-rails.rb,
lib/faye-rails/filter.rb,
lib/faye-rails/version.rb,
lib/faye-rails/matcher.rb,
lib/faye-rails/middleware.rb,
lib/faye-rails/controller.rb,
lib/faye-rails/rack_adapter.rb,
lib/faye-rails/controller/channel.rb,
lib/faye-rails/controller/message.rb,
lib/faye-rails/controller/monitor.rb,
lib/faye-rails/controller/observer_factory.rb

Defined Under Namespace

Modules: Matcher Classes: Controller, Engine, Filter, Middleware, RackAdapter

Constant Summary

ROOT =
File.expand_path(File.dirname(__FILE__))
VERSION =
"2.0.0"

Class Method Summary collapse

Class Method Details

.client(where = nil) ⇒ Object



35
36
37
38
39
40
41
# File 'lib/faye-rails.rb', line 35

def self.client(where=nil)
  if where
    servers.at(where).first.get_client
  else
    servers.first.get_client
  end
end

.clientsObject



31
32
33
# File 'lib/faye-rails.rb', line 31

def self.clients
  servers.map(&:get_client)
end

.server(where = nil) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/faye-rails.rb', line 23

def self.server(where=nil)
  if where
    servers.at(where).first
  else
    servers.first
  end
end

.serversObject



19
20
21
# File 'lib/faye-rails.rb', line 19

def self.servers
  @servers ||= ServerList.new
end