Sha256: 606cc4c470a818cfa0128efedd06e76e05743c3377258e436a4f7629ce2ce214

Contents?: true

Size: 292 Bytes

Versions: 2

Compression:

Stored size: 292 Bytes

Contents

class Radiodan::MPD
  class Ack
    FORMAT = /ACK \[(\d)+@(\d)+\] \{(.*)\} (.*)/
    attr_reader :error_id, :position, :command, :description
    
    def initialize(ack)
      matches = FORMAT.match(ack)
      @error_id, @position, @command, @description = *matches[1..-1]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
radiodan-1.0.1 lib/radiodan/adapter/mpd/ack.rb
radiodan-1.0.0 lib/radiodan/adapter/mpd/ack.rb