Class: MPD::Commands::AllFiles

Inherits:
Abstract
  • Object
show all
Defined in:
lib/mpd/commands/all_files.rb

Overview

Uses “listall” command to get all files (directories are filtered out) from db.

Instance Attribute Summary

Attributes inherited from Abstract

#connection

Instance Method Summary collapse

Methods inherited from Abstract

#initialize

Constructor Details

This class inherits a constructor from MPD::Commands::Abstract

Instance Method Details

#executeObject


10
11
12
13
14
# File 'lib/mpd/commands/all_files.rb', line 10

def execute
  super('listall').key_value_pairs
                  .select { |e| e[0] == 'file' }
                  .map(&:last)
end