Class: Vnehm::ListCommand

Inherits:
TracksViewCommand show all
Defined in:
lib/vnehm/commands/list_command.rb

Overview

This command gets likes/posts from user’s account, Prints as menu, and downloads selected tracks

Constant Summary

Constants inherited from TracksViewCommand

TracksViewCommand::DEFAULT_LIMIT, TracksViewCommand::DEFAULT_OFFSET

Instance Attribute Summary

Attributes inherited from Command

#options, #options_descs

Instance Method Summary collapse

Methods inherited from TracksViewCommand

#execute

Methods inherited from Command

#add_option, #arguments, #execute, #handle_options, #invoke

Constructor Details

#initializeListCommand

Returns a new instance of ListCommand.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/vnehm/commands/list_command.rb', line 11

def initialize
  super

  add_option(:to, 'to ПУТЬ',
             'Скачивать аудиозапись(и) в ПУТЬ')

  add_option(:pl, 'pl ПЛЕЙЛИСТ',
             "Добавлять аудиозапись(и) в плейлист iTunes'a c именем" \
                                                              ' ПЛЕЙЛИСТ')

  add_option(:limit, 'limit ЧИСЛО',
             'Показывать ЧИСЛО аудиозаписей на каждой страницe')

  add_option(:offset, 'offset ЧИСЛО',
             'Показывать с ЧИСЛО+1 аудиозаписи')

  add_option(:dl, 'dl yes',
             'Не добавлять аудиозапись(и) в iTunes. Просто скачать их')
end

Instance Method Details

#program_nameObject



31
32
33
# File 'lib/vnehm/commands/list_command.rb', line 31

def program_name
  'vnehm list'
end

#summaryObject



35
36
37
# File 'lib/vnehm/commands/list_command.rb', line 35

def summary
  'Вывод списка ваших аудиозаписей из VK и загрузка выбранных треков'
end

#usageObject



39
40
41
# File 'lib/vnehm/commands/list_command.rb', line 39

def usage
  "#{program_name} [ОПЦИИ]"
end