module Mumukit::Platform::Notifiable

Public Instance Methods

as_platform_event() click to toggle source
# File lib/mumukit/platform/notifiable.rb, line 10
def as_platform_event
  { platform_class_name.downcase => to_resource_h }
end
notify!(event_type = :changed) click to toggle source
# File lib/mumukit/platform/notifiable.rb, line 2
def notify!(event_type = :changed)
  Mumukit::Nuntius.notify_event! platform_event_name(event_type), as_platform_event
end
platform_event_name(event_type) click to toggle source
# File lib/mumukit/platform/notifiable.rb, line 6
def platform_event_name(event_type)
  "#{platform_class_name}#{event_type.to_s.titlecase}"
end