Class: Pgque::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/pgque/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#extraObject (readonly)

Returns the value of attribute extra.



5
6
7
# File 'lib/pgque/event.rb', line 5

def extra
  @extra
end

#payloadObject (readonly)

Returns the value of attribute payload.



5
6
7
# File 'lib/pgque/event.rb', line 5

def payload
  @payload
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/pgque/event.rb', line 5

def type
  @type
end