class Redisse::TestPublisher
Internal: Publisher that stores events in memory for easy testing.
See {Redisse#test_mode! Redisse#test_mode!
}.
Attributes
filter[RW]
published[R]
Public Class Methods
new()
click to toggle source
# File lib/redisse/publisher.rb, line 30 def initialize @published = [] end
Public Instance Methods
publish(channel, data, type)
click to toggle source
# File lib/redisse/publisher.rb, line 38 def publish(channel, data, type) return if filter && !(filter === type) @published << TestEvent.new(channel, data, type) end