openreplay/mobs/templates/ee~connectors~msgcodec~messages.py.erb

16 lines
409 B
Text

# Auto-generated, do not edit
from abc import ABC
class Message(ABC):
pass
<% $messages.each do |msg| %>
class <%= msg.name %>(Message):
__id__ = <%= msg.id %>
def __init__(self, <%= msg.attributes.map { |attr| "#{attr.name.underscore}" }.join ", " %>):
<%= msg.attributes.map { |attr| "self.#{attr.name.underscore} = #{attr.name.underscore}" }.join "\n "
%>
<% end %>