Sha256: dc5f2bca09be58fc9cc8fac11999b3791731e89075df603bf9336db5452e554b

Contents?: true

Size: 887 Bytes

Versions: 2

Compression:

Stored size: 887 Bytes

Contents

require File.join(File.dirname(__FILE__), "commands/generators")
require File.join(File.dirname(__FILE__), "commands/admin")
require File.join(File.dirname(__FILE__), "commands/database")
require File.join(File.dirname(__FILE__), "commands/miscellaneous")
require File.join(File.dirname(__FILE__), "commands/playback")
require File.join(File.dirname(__FILE__), "commands/playlist")

module Rmpd
  module Commands

    private

    def send_command(command, *args)
      if in_command_list?
        @command_list << [command, args]
      else
        case command
        when /^command_list_end$/
          # blah
          @command_list = nil
        when /^command_list.*begin$/
          @command_list = [command, args]
        else
          connection.send_command(command, *args)
        end
      end
    end

    def in_command_list?
      !@command_list.nil?
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rmpd-1.1.16 lib/rmpd/commands.rb
rmpd-1.1.15 lib/rmpd/commands.rb