Sha256: 4b4a61fd73f5187f08c1b2eb6809da8337bb9054d2faa80b784e545d3f0ab6ff

Contents?: true

Size: 729 Bytes

Versions: 2

Compression:

Stored size: 729 Bytes

Contents

module Rmpd
  module Commands

    complex_command :commands, :regexp => /(^command: )/i
    simple_command :notcommands, :regexp => /(^command: )/i

    simple_command :clearerror
    simple_command :idle
    simple_command :noidle
    simple_command :password
    simple_command :ping
    simple_command :stats
    simple_command :status

    def close
      send_command("close")
      @socket.close
    end

    alias_method :clear_error, :clearerror
    alias_method :not_commands, :notcommands

    def command_list
      send_command("command_list_begin")
      @in_command_list = true
      yield self
      send_command("command_list_end")
      read_response
    ensure
      @in_command_list = false
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rmpd-1.0.1 lib/rmpd/commands/miscellaneous.rb
rmpd-1.0.0 lib/rmpd/commands/miscellaneous.rb