Class: Vnehm::DlCommand
Instance Attribute Summary
Attributes inherited from Command
#options, #options_descs
Instance Method Summary
collapse
Methods inherited from Command
#add_option, #handle_options, #invoke
Constructor Details
Returns a new instance of DlCommand.
4
5
6
7
8
9
|
# File 'lib/vnehm/commands/dl_command.rb', line 4
def initialize
super
add_option(:to, 'to ПУТЬ',
'Скачать аудиозапись(и) в ПУТЬ')
end
|
Instance Method Details
#arguments ⇒ Object
19
20
21
|
# File 'lib/vnehm/commands/dl_command.rb', line 19
def arguments
{ 'ЧИСЛО' => '(Необязательно) Скачать последние ЧИСЛО Ваших аудиозаписей' }
end
|
#execute ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/vnehm/commands/dl_command.rb', line 11
def execute
@options[:dl] = 'yes'
get_cmd = CommandManager.command_instance('get')
get_cmd.options = @options
get_cmd.execute
end
|
#program_name ⇒ Object
23
24
25
|
# File 'lib/vnehm/commands/dl_command.rb', line 23
def program_name
'vnehm dl'
end
|
#summary ⇒ Object
27
28
29
|
# File 'lib/vnehm/commands/dl_command.rb', line 27
def summary
'Загрузка Ваших аудиозаписей из VK'
end
|
#usage ⇒ Object
31
32
33
|
# File 'lib/vnehm/commands/dl_command.rb', line 31
def usage
"#{program_name} [ЧИСЛО] [ОПЦИИ]"
end
|