Class: MPV::Event::EndFile

Inherits:
MPV::Event show all
Defined in:
lib/mpvlib/event.rb

Instance Attribute Summary collapse

Attributes inherited from MPV::Event

#event_id, #reply_id

Instance Method Summary collapse

Methods inherited from MPV::Event

new_from_mpv_event

Constructor Details

#initialize(mpv_event) ⇒ EndFile

Returns a new instance of EndFile.



152
153
154
155
156
157
# File 'lib/mpvlib/event.rb', line 152

def initialize(mpv_event)
  super
  data = MPVEventEndFile.new(mpv_event[:data])
  @reason = data[:reason]
  @error = (data[:error] < 0) ? MPV::Error.new(data[:error]) : nil
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



150
151
152
# File 'lib/mpvlib/event.rb', line 150

def error
  @error
end

#reasonObject

Returns the value of attribute reason.



149
150
151
# File 'lib/mpvlib/event.rb', line 149

def reason
  @reason
end