Class: Pgque::Event
- Inherits:
-
Object
- Object
- Pgque::Event
- Defined in:
- lib/pgque/event.rb
Instance Attribute Summary collapse
-
#extra ⇒ Object
readonly
Returns the value of attribute extra.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(payload:, type: "default", extra: {}) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(payload:, type: "default", extra: {}) ⇒ Event
Returns a new instance of Event.
7 8 9 10 11 |
# File 'lib/pgque/event.rb', line 7 def initialize(payload:, type: "default", extra: {}) @payload = payload @type = type @extra = extra end |
Instance Attribute Details
#extra ⇒ Object (readonly)
Returns the value of attribute extra.
5 6 7 |
# File 'lib/pgque/event.rb', line 5 def extra @extra end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
5 6 7 |
# File 'lib/pgque/event.rb', line 5 def payload @payload end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/pgque/event.rb', line 5 def type @type end |