class Riffer::StreamEvents::Interrupt
rbs_inline: enabled
Attributes
Public Class Methods
Source
# File lib/riffer/stream_events/interrupt.rb, line 9 def initialize(reason: nil) super(role: :system) @reason = reason end
Calls superclass method
Riffer::StreamEvents::Base::new
Public Instance Methods
Source
# File lib/riffer/stream_events/interrupt.rb, line 16 def to_h h = { role: @role, interrupt: true } #: Hash[Symbol, untyped] h[:reason] = @reason if @reason h end