Module: ProxyRb::Console::Help

Defined in:
lib/proxy_rb/console/help.rb

Overview

Helpers for ProxyRb::Console

Instance Method Summary collapse

Instance Method Details

#proxy_rb_helpObject

Output help information



11
12
13
14
15
16
17
18
# File 'lib/proxy_rb/console/help.rb', line 11

def proxy_rb_help
  puts 'ProxyRb Version: ' + ProxyRb::VERSION
  puts 'Issue Tracker: ' + 'https://github.com/fedux-org/proxy_rb/issues'
  puts "Documentation:\n" + %w(http://www.rubydoc.info/gems/proxy_rb).map { |d| format('* %s', d) }.join("\n")
  puts

  nil
end

#proxy_rb_methodsObject

List available methods in proxy_rb



21
22
23
24
25
26
# File 'lib/proxy_rb/console/help.rb', line 21

def proxy_rb_methods
  ms = (ProxyRb::Api.instance_methods - Module.instance_methods).each_with_object([]) { |e, a| a << format('* %s', e) }.sort
  puts "Available Methods:\n" + ms.join("\n")

  nil
end