class Redisse::TestEvent

Public: An event in test mode.

You can re-open or add modules to this class if you want to add behavior to events found in {Redisse#published Redisse#published} for easier testing.

Examples

class Redisse::TestEvent
  def yml
    YAML.load data
  end

  def private?
    channel.start_with? 'private'
  end
end

Public Instance Methods

json() click to toggle source

Public: Helper method to parse the Event data as JSON.

# File lib/redisse/publisher.rb, line 66
def json
  JSON.parse(data)
end