Sha256: 795ee08ecdcd06576dc202623c45afcd4ebafb73657aa64278e4a8cdc30692e7
Contents?: true
Size: 746 Bytes
Versions: 4
Compression:
Stored size: 746 Bytes
Contents
require File.join(File.dirname(__FILE__), "rmpd/config") require File.join(File.dirname(__FILE__), "rmpd/commands") require File.join(File.dirname(__FILE__), "rmpd/connection") require File.join(File.dirname(__FILE__), "rmpd/multi_response") require File.join(File.dirname(__FILE__), "rmpd/response") module Rmpd ACK_RE = /^ACK \[(\d+)@(\d+)\] \{([^}]*)\} (.*)$/ OK_RE = /^OK.*$/ class MpdError < StandardError ; end class MpdConnRefusedError < MpdError ; end class MpdAckError < MpdError def initialize(regex_match) @error, @command_list_num, @current_command, @message = regex_match.values_at(1..-1) end def to_s "ACK [#{@error}@#{@command_list_num}] {#{@current_command}} #{@message}" end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rmpd-1.0.4 | lib/rmpd.rb |
rmpd-1.0.3 | lib/rmpd.rb |
rmpd-1.0.2 | lib/rmpd.rb |
rmpd-1.0.1 | lib/rmpd.rb |