Class: Redisse::TestEvent
- Inherits:
-
Struct
- Object
- Struct
- Redisse::TestEvent
- Defined in:
- lib/redisse/publisher.rb,
lib/redisse/publisher.rb
Overview
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 for easier testing.
Instance Attribute Summary (collapse)
-
- (Object) channel
Returns the value of attribute channel.
-
- (Object) data
Returns the value of attribute data.
-
- (Object) type
Returns the value of attribute type.
Instance Method Summary (collapse)
-
- (Object) json
Helper method to parse the Event data as JSON.
Instance Attribute Details
- (Object) channel
Returns the value of attribute channel
45 46 47 |
# File 'lib/redisse/publisher.rb', line 45 def channel @channel end |
- (Object) data
Returns the value of attribute data
45 46 47 |
# File 'lib/redisse/publisher.rb', line 45 def data @data end |
- (Object) type
Returns the value of attribute type
45 46 47 |
# File 'lib/redisse/publisher.rb', line 45 def type @type end |
Instance Method Details
- (Object) json
Helper method to parse the Event data as JSON.
66 67 68 |
# File 'lib/redisse/publisher.rb', line 66 def json JSON.parse(data) end |