Module: Help
- Defined in:
- lib/nehm/help.rb
Overview
Help module responds to ‘nehm help …’ command
Class Method Summary collapse
- .available_commands ⇒ Object
- .configure ⇒ Object
- .dl ⇒ Object
- .get ⇒ Object
- .permalink ⇒ Object
- .show(command) ⇒ Object
Class Method Details
.available_commands ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/nehm/help.rb', line 3 def self.available_commands puts Paint['Avalaible nehm commands:', :yellow] puts ' ' + Paint['get', :green] + ' - Downloading, setting tags and adding to your iTunes library last post or like from your profile' puts ' ' + Paint['dl', :green] + ' - Downloading and setting tags last post or like from your profile' puts ' ' + Paint['configure', :green] + ' - Configuring application' puts "See #{Paint['nehm help [command]', :yellow]} to read about a specific subcommand" end |
.configure ⇒ Object
26 27 28 29 30 31 |
# File 'lib/nehm/help.rb', line 26 def configure puts Paint['Input: ', :yellow] + 'nehm configure' puts "\n" puts Paint['Available options:', :yellow] puts ' No options' end |
.dl ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/nehm/help.rb', line 33 def dl puts Paint['Input: ', :yellow] + 'nehm dl OPTIONS [from PERMALINK] [to PATHTODIRECTORY]' puts "\n" puts Paint['OPTIONS:', :yellow] puts ' ' + Paint['post', :green] + ' - Downloading and setting tags last post(track or repost) from your profile' puts ' ' + Paint['<number> posts', :green] + ' - Downloading and setting tags last <number> posts from your profile' puts ' ' + Paint['like', :green] + ' - Downloading and setting tags your last like' puts ' ' + Paint['<number> likes', :green] + ' - Downloading and setting tags your last <number> likes' puts "\n" puts Paint['Extra options:', :yellow] puts ' ' + Paint['from PERMALINK', :green] + ' - Do the aforecited operations from the custom user profile' puts ' ' + Paint['to PATHTODIRECTORY', :green] + ' - Do the aforecited operations to the custom directory' end |
.get ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/nehm/help.rb', line 47 def get puts Paint['Input: ', :yellow] + 'nehm get OPTIONS [from PERMALINK] [to PATHTODIRECTORY]' puts "\n" puts Paint['OPTIONS:', :yellow] puts ' ' + Paint['post', :green] + ' - Downloading, setting tags and adding to your iTunes library last post(track or repost) from your profile' puts ' ' + Paint['<number> posts', :green] + ' - Downloading, setting tags and adding to your iTunes library last <number> posts from your profile' puts ' ' + Paint['like', :green] + ' - Downloading, setting tags and adding to your iTunes library your last like' puts ' ' + Paint['<number> likes', :green] + ' - Downloading, setting tags and adding to your iTunes library your last <number> likes' puts "\n" puts Paint['Extra options:', :yellow] puts ' ' + Paint['from PERMALINK', :green] + ' - Do the aforecited operations from the profile with PERMALINK' puts ' ' + Paint['to PATHTODIRECTORY', :green] + ' - Do the aforecited operations to the custom directory' end |
.permalink ⇒ Object
61 62 63 64 |
# File 'lib/nehm/help.rb', line 61 def permalink puts 'Permalink is the last word in your profile url' puts 'Example: for profile url ' + Paint['soundcloud.com/qwerty', :magenta] + ' permalink is ' + Paint['qwerty', :magenta] end |
.show(command) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/nehm/help.rb', line 11 def self.show(command) case command when 'get', 'dl', 'configure' Help.send(command) when nil Help.available_commands else puts Paint["Command #{command} doesn't exist", :red] puts "\n" Help.available_commands end end |