Module: PusherFake
- Defined in:
- lib/pusher-fake.rb,
lib/pusher-fake/server.rb,
lib/pusher-fake/channel.rb,
lib/pusher-fake/webhook.rb,
lib/pusher-fake/connection.rb,
lib/pusher-fake/configuration.rb,
lib/pusher-fake/channel/public.rb,
lib/pusher-fake/channel/private.rb,
lib/pusher-fake/channel/presence.rb,
lib/pusher-fake/server/application.rb,
lib/pusher-fake/server/chain_trap_handlers.rb
Overview
:nocov:
Defined Under Namespace
Modules: Channel, Server Classes: Configuration, Connection, Webhook
Constant Summary collapse
- VERSION =
The current version string.
"6.0.0"
Class Method Summary collapse
-
.configuration ⇒ Configuration
Current configuration.
-
.configure {|Configuration| ... } ⇒ Object
Call this method to modify the defaults.
-
.javascript(options = {}) ⇒ String
Convenience method for the JS to override the Pusher client host and port.
- .log(message) ⇒ Object
Class Method Details
.configuration ⇒ Configuration
Returns Current configuration.
33 34 35 |
# File 'lib/pusher-fake.rb', line 33 def self.configuration @configuration ||= Configuration.new end |
.configure {|Configuration| ... } ⇒ Object
Call this method to modify the defaults.
28 29 30 |
# File 'lib/pusher-fake.rb', line 28 def self.configure yield configuration end |
.javascript(options = {}) ⇒ String
Convenience method for the JS to override the Pusher client host and port.
41 42 43 44 45 46 47 48 |
# File 'lib/pusher-fake.rb', line 41 def self.javascript( = {}) arguments = [ configuration.key, configuration.() ].map(&:to_json).join(",") "new Pusher(#{arguments})" end |
.log(message) ⇒ Object
50 51 52 |
# File 'lib/pusher-fake.rb', line 50 def self.log() configuration.logger << "#{}\n" if configuration.verbose end |