| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | require "optparse" | 
					
						
							|  |  |  | require "shellwords" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-04 15:24:58 +02:00
										 |  |  | require "extend/optparse" | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  | require "hbc/cli/options" | 
					
						
							| 
									
										
										
										
											2016-10-04 15:24:58 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-20 19:08:03 +02:00
										 |  |  | require "hbc/cli/abstract_command" | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | require "hbc/cli/audit" | 
					
						
							|  |  |  | require "hbc/cli/cat" | 
					
						
							|  |  |  | require "hbc/cli/cleanup" | 
					
						
							|  |  |  | require "hbc/cli/create" | 
					
						
							|  |  |  | require "hbc/cli/doctor" | 
					
						
							|  |  |  | require "hbc/cli/edit" | 
					
						
							|  |  |  | require "hbc/cli/fetch" | 
					
						
							|  |  |  | require "hbc/cli/home" | 
					
						
							|  |  |  | require "hbc/cli/info" | 
					
						
							|  |  |  | require "hbc/cli/install" | 
					
						
							|  |  |  | require "hbc/cli/list" | 
					
						
							| 
									
										
										
										
											2017-02-27 22:33:34 +02:00
										 |  |  | require "hbc/cli/outdated" | 
					
						
							| 
									
										
										
										
											2016-10-09 10:21:07 +02:00
										 |  |  | require "hbc/cli/reinstall" | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | require "hbc/cli/search" | 
					
						
							|  |  |  | require "hbc/cli/style" | 
					
						
							|  |  |  | require "hbc/cli/uninstall" | 
					
						
							| 
									
										
										
										
											2017-03-08 15:49:37 +01:00
										 |  |  | require "hbc/cli/--version" | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | require "hbc/cli/zap" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-20 19:08:03 +02:00
										 |  |  | require "hbc/cli/abstract_internal_command" | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | require "hbc/cli/internal_audit_modified_casks" | 
					
						
							| 
									
										
										
										
											2017-01-22 04:28:33 +01:00
										 |  |  | require "hbc/cli/internal_appcast_checkpoint" | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | require "hbc/cli/internal_checkurl" | 
					
						
							|  |  |  | require "hbc/cli/internal_dump" | 
					
						
							|  |  |  | require "hbc/cli/internal_help" | 
					
						
							|  |  |  | require "hbc/cli/internal_stanza" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  | module Hbc | 
					
						
							|  |  |  |   class CLI | 
					
						
							|  |  |  |     ALIASES = { | 
					
						
							| 
									
										
										
										
											2016-10-14 20:33:16 +02:00
										 |  |  |       "ls"       => "list", | 
					
						
							|  |  |  |       "homepage" => "home", | 
					
						
							|  |  |  |       "-S"       => "search",    # verb starting with "-" is questionable | 
					
						
							|  |  |  |       "up"       => "update", | 
					
						
							|  |  |  |       "instal"   => "install",   # gem does the same | 
					
						
							| 
									
										
										
										
											2017-02-21 04:35:52 -08:00
										 |  |  |       "uninstal" => "uninstall", | 
					
						
							| 
									
										
										
										
											2016-10-14 20:33:16 +02:00
										 |  |  |       "rm"       => "uninstall", | 
					
						
							|  |  |  |       "remove"   => "uninstall", | 
					
						
							|  |  |  |       "abv"      => "info", | 
					
						
							|  |  |  |       "dr"       => "doctor", | 
					
						
							|  |  |  |     }.freeze | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  |     include Options | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     option "--appdir=PATH",               ->(value) { Hbc.appdir               = value } | 
					
						
							|  |  |  |     option "--colorpickerdir=PATH",       ->(value) { Hbc.colorpickerdir       = value } | 
					
						
							|  |  |  |     option "--prefpanedir=PATH",          ->(value) { Hbc.prefpanedir          = value } | 
					
						
							|  |  |  |     option "--qlplugindir=PATH",          ->(value) { Hbc.qlplugindir          = value } | 
					
						
							|  |  |  |     option "--dictionarydir=PATH",        ->(value) { Hbc.dictionarydir        = value } | 
					
						
							|  |  |  |     option "--fontdir=PATH",              ->(value) { Hbc.fontdir              = value } | 
					
						
							|  |  |  |     option "--servicedir=PATH",           ->(value) { Hbc.servicedir           = value } | 
					
						
							|  |  |  |     option "--input_methoddir=PATH",      ->(value) { Hbc.input_methoddir      = value } | 
					
						
							|  |  |  |     option "--internet_plugindir=PATH",   ->(value) { Hbc.internet_plugindir   = value } | 
					
						
							|  |  |  |     option "--audio_unit_plugindir=PATH", ->(value) { Hbc.audio_unit_plugindir = value } | 
					
						
							|  |  |  |     option "--vst_plugindir=PATH",        ->(value) { Hbc.vst_plugindir        = value } | 
					
						
							|  |  |  |     option "--vst3_plugindir=PATH",       ->(value) { Hbc.vst3_plugindir       = value } | 
					
						
							|  |  |  |     option "--screen_saverdir=PATH",      ->(value) { Hbc.screen_saverdir      = value } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     option "--help", :help, false | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # handled in OS::Mac | 
					
						
							| 
									
										
										
										
											2017-06-12 19:07:52 +02:00
										 |  |  |     option "--language a,b,c", ->(*) {} | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # override default handling of --version | 
					
						
							|  |  |  |     option "--version", ->(*) { raise OptionParser::InvalidOption } | 
					
						
							| 
									
										
										
										
											2017-03-06 20:37:13 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |     def self.command_classes | 
					
						
							| 
									
										
										
										
											2016-10-14 20:55:09 +02:00
										 |  |  |       @command_classes ||= constants.map(&method(:const_get)) | 
					
						
							| 
									
										
										
										
											2017-05-20 19:08:03 +02:00
										 |  |  |                                     .select { |klass| klass.respond_to?(:run) } | 
					
						
							|  |  |  |                                     .reject(&:abstract?) | 
					
						
							| 
									
										
										
										
											2016-12-30 16:13:09 +01:00
										 |  |  |                                     .sort_by(&:command_name) | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |     def self.commands | 
					
						
							|  |  |  |       @commands ||= command_classes.map(&:command_name) | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  |     def self.lookup_command(command_name) | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       @lookup ||= Hash[commands.zip(command_classes)] | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  |       command_name = ALIASES.fetch(command_name, command_name) | 
					
						
							|  |  |  |       @lookup.fetch(command_name, command_name) | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |     def self.should_init?(command) | 
					
						
							| 
									
										
										
										
											2017-05-20 19:08:03 +02:00
										 |  |  |       command.is_a?(Class) && !command.abstract? && command.needs_init? | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-03 01:29:29 +02:00
										 |  |  |     def self.run_command(command, *args) | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       if command.respond_to?(:run) | 
					
						
							|  |  |  |         # usual case: built-in command verb | 
					
						
							| 
									
										
										
										
											2017-06-03 01:29:29 +02:00
										 |  |  |         command.run(*args) | 
					
						
							| 
									
										
										
										
											2017-04-27 20:17:06 +02:00
										 |  |  |       elsif require?(which("brewcask-#{command}.rb")) | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |         # external command as Ruby library on PATH, Homebrew-style | 
					
						
							|  |  |  |       elsif command.to_s.include?("/") && require?(command.to_s) | 
					
						
							|  |  |  |         # external command as Ruby library with literal path, useful | 
					
						
							|  |  |  |         # for development and troubleshooting | 
					
						
							| 
									
										
										
										
											2017-03-08 15:49:37 +01:00
										 |  |  |         sym = File.basename(command.to_s, ".rb").capitalize | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |         klass = begin | 
					
						
							| 
									
										
										
										
											2016-10-14 20:55:09 +02:00
										 |  |  |                   const_get(sym) | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |                 rescue NameError | 
					
						
							|  |  |  |                   nil | 
					
						
							|  |  |  |                 end | 
					
						
							| 
									
										
										
										
											2016-09-20 15:11:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |         if klass.respond_to?(:run) | 
					
						
							|  |  |  |           # invoke "run" on a Ruby library which follows our coding conventions | 
					
						
							|  |  |  |           # other Ruby libraries must do everything via "require" | 
					
						
							| 
									
										
										
										
											2017-06-03 01:29:29 +02:00
										 |  |  |           klass.run(*args) | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |         end | 
					
						
							| 
									
										
										
										
											2016-10-18 17:22:08 +02:00
										 |  |  |       elsif which("brewcask-#{command}") | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |         # arbitrary external executable on PATH, Homebrew-style | 
					
						
							|  |  |  |         exec "brewcask-#{command}", *ARGV[1..-1] | 
					
						
							|  |  |  |       elsif Pathname.new(command.to_s).executable? && | 
					
						
							|  |  |  |             command.to_s.include?("/") && | 
					
						
							| 
									
										
										
										
											2016-10-14 20:03:34 +02:00
										 |  |  |             !command.to_s.match(/\.rb$/) | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |         # arbitrary external executable with literal path, useful | 
					
						
							|  |  |  |         # for development and troubleshooting | 
					
						
							|  |  |  |         exec command, *ARGV[1..-1] | 
					
						
							|  |  |  |       else | 
					
						
							|  |  |  |         # failure | 
					
						
							| 
									
										
										
										
											2017-06-03 01:29:29 +02:00
										 |  |  |         NullCommand.new(command, *args).run | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  |     def self.run(*args) | 
					
						
							|  |  |  |       new(*args).run | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def initialize(*args) | 
					
						
							|  |  |  |       @args = process_options(*args) | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-03 01:29:29 +02:00
										 |  |  |     def detect_command_and_arguments(*args) | 
					
						
							|  |  |  |       command = args.detect do |arg| | 
					
						
							|  |  |  |         if self.class.commands.include?(arg) | 
					
						
							|  |  |  |           true | 
					
						
							|  |  |  |         else | 
					
						
							|  |  |  |           break unless arg.start_with?("-") | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       if index = args.index(command) | 
					
						
							|  |  |  |         args.delete_at(index) | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       [*command, *args] | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  |     def run | 
					
						
							| 
									
										
										
										
											2017-06-03 01:29:29 +02:00
										 |  |  |       command_name, *args = detect_command_and_arguments(*@args) | 
					
						
							|  |  |  |       command = if help? | 
					
						
							|  |  |  |         args.unshift(command_name) | 
					
						
							|  |  |  |         "help" | 
					
						
							|  |  |  |       else | 
					
						
							|  |  |  |         self.class.lookup_command(command_name) | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-29 18:24:52 +01:00
										 |  |  |       MacOS.full_version = ENV["MACOS_VERSION"] unless ENV["MACOS_VERSION"].nil? | 
					
						
							| 
									
										
										
										
											2017-01-20 09:00:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       Hbc.default_tap.install unless Hbc.default_tap.installed? | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  |       Hbc.init if self.class.should_init?(command) | 
					
						
							|  |  |  |       self.class.run_command(command, *args) | 
					
						
							| 
									
										
										
										
											2017-06-11 02:00:59 +02:00
										 |  |  |     rescue CaskError, ArgumentError, OptionParser::InvalidOption => e | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       msg = e.message | 
					
						
							| 
									
										
										
										
											2017-06-03 01:29:29 +02:00
										 |  |  |       msg << e.backtrace.join("\n").prepend("\n") if ARGV.debug? | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       onoe msg | 
					
						
							|  |  |  |       exit 1
 | 
					
						
							|  |  |  |     rescue StandardError, ScriptError, NoMemoryError => e | 
					
						
							| 
									
										
										
										
											2016-10-17 15:28:40 -05:00
										 |  |  |       msg = "#{e.message}\n" | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       msg << Utils.error_message_with_suggestions | 
					
						
							|  |  |  |       msg << e.backtrace.join("\n") | 
					
						
							|  |  |  |       onoe msg | 
					
						
							|  |  |  |       exit 1
 | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def self.nice_listing(cask_list) | 
					
						
							|  |  |  |       cask_taps = {} | 
					
						
							|  |  |  |       cask_list.each do |c| | 
					
						
							|  |  |  |         user, repo, token = c.split "/" | 
					
						
							| 
									
										
										
										
											2016-10-14 20:03:34 +02:00
										 |  |  |         repo.sub!(/^homebrew-/i, "") | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |         cask_taps[token] ||= [] | 
					
						
							|  |  |  |         cask_taps[token].push "#{user}/#{repo}" | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |       end | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       list = [] | 
					
						
							|  |  |  |       cask_taps.each do |token, taps| | 
					
						
							|  |  |  |         if taps.length == 1
 | 
					
						
							|  |  |  |           list.push token | 
					
						
							|  |  |  |         else | 
					
						
							|  |  |  |           taps.each { |r| list.push [r, token].join "/" } | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  |       list.sort | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  |     def process_options(*args) | 
					
						
							|  |  |  |       all_args = Shellwords.shellsplit(ENV["HOMEBREW_CASK_OPTS"] || "") + args | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  |       non_options = [] | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  |       if idx = all_args.index("--") | 
					
						
							|  |  |  |         non_options += all_args.drop(idx) | 
					
						
							|  |  |  |         all_args = all_args.first(idx) | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |       end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  |       remaining = all_args.select do |arg| | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |         begin | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  |           !process_arguments([arg]).empty? | 
					
						
							|  |  |  |         rescue OptionParser::InvalidOption, OptionParser::MissingArgument, OptionParser::AmbiguousOption | 
					
						
							|  |  |  |           true | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |         end | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |       end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-21 00:15:56 +02:00
										 |  |  |       remaining + non_options | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |     class NullCommand | 
					
						
							| 
									
										
										
										
											2017-06-03 01:29:29 +02:00
										 |  |  |       def initialize(command, *args) | 
					
						
							|  |  |  |         @command = command | 
					
						
							|  |  |  |         @args = args | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-08 15:49:37 +01:00
										 |  |  |       def run(*_args) | 
					
						
							|  |  |  |         purpose | 
					
						
							|  |  |  |         usage | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-03 01:29:29 +02:00
										 |  |  |         return if @command == "help" && @args.empty? | 
					
						
							| 
									
										
										
										
											2017-03-08 15:49:37 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-03 01:29:29 +02:00
										 |  |  |         unknown_command = @args.empty? ? @command : @args.first | 
					
						
							|  |  |  |         raise ArgumentError, "Unknown command: #{unknown_command}" | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |       end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       def purpose | 
					
						
							|  |  |  |         puts <<-EOS.undent
 | 
					
						
							|  |  |  |           brew-cask provides a friendly homebrew-style CLI workflow for the | 
					
						
							|  |  |  |           administration of macOS applications distributed as binaries. | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |         EOS | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       def usage | 
					
						
							|  |  |  |         max_command_len = CLI.commands.map(&:length).max | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |         puts "Commands:\n\n" | 
					
						
							|  |  |  |         CLI.command_classes.each do |klass| | 
					
						
							|  |  |  |           next unless klass.visible | 
					
						
							|  |  |  |           puts "    #{klass.command_name.ljust(max_command_len)}  #{_help_for(klass)}" | 
					
						
							|  |  |  |         end | 
					
						
							| 
									
										
										
										
											2016-10-14 20:08:05 +02:00
										 |  |  |         puts %Q(\nSee also "man brew-cask") | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |       end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       def help | 
					
						
							|  |  |  |         "" | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-24 13:52:43 +02:00
										 |  |  |       def _help_for(klass) | 
					
						
							|  |  |  |         klass.respond_to?(:help) ? klass.help : nil | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |