module Nova::Starbound::DefaultBehavior::Eventable::InstanceMethods
Instance methods.
Public Instance Methods
attach_events(protocol)
click to toggle source
Attaches the specified events to the protocol.
@return [void]
# File lib/nova/starbound/default_behavior/eventable.rb, line 63 def attach_events(protocol) self.class.handles.each do |k, v| if v.is_a? Symbol protocol.on(k, &method(v)) else protocol.on(k, &v) end end end