class DaFunk::NotificationEvent

Attributes

callback[R]
event[R]
id[R]
parameters[R]

Public Class Methods

new(event) click to toggle source

“3|SHOW_MESSAGE|TEST1|12-20-2017 18:23”

# File lib/da_funk/notification_event.rb, line 10
def initialize(event)
  values = event.to_s.split("|")
  @id    = values.shift # id
  @callback, *@parameters = values
end

Public Instance Methods

perform() click to toggle source
# File lib/da_funk/notification_event.rb, line 5
def perform
  Notification.execute(self)
end

Private Instance Methods

reply() click to toggle source
# File lib/da_funk/notification_event.rb, line 18
def reply
  if id
    {"type" => "pnconf","event" => "#{id}"}.to_json
  end
end