System Browser
Description
System Browser is a Ruby gem that serves as a bridge between a Ruby process and the System Browser Client. It allows you to browse Ruby behaviours (classes and modules), its methods and the methods' source code. Make sure that you have the client installed.
Examples
The easiest way to play with System Browser is to start it from a REPL such as Pry or [IRB](https://github.com/ruby/ruby/blob/8754f619 d51a67fc4df255c189c8ff744433dd6e/lib/irb.rb).
Basic example
require 'system_browser'
SystemBrowser.start
Nonblocking start
By default SystemBrowser.start
blocks the current thread. This is useful if you
launch the browser from a small script. If you start the browser inside a
complex framework such as Rails, blocking may be unwanted. In this case start
the browser like this:
SystemBrowser.start(block: false)
The block
flag will run the browser in a separate thread and return it (it's
up to you if you want to join it).
Debugging
If you wish to contribute, you may find the debug
flag useful. For debugging
purposes invoke the browser like this:
SystemBrowser.start(debug: true)
For additional information see the examples/
directory.
Installation
All you need is to install the gem.
gem install system_browser
Limitations
Supports only CRuby.
- CRuby 2.2.2 and higher
Other Ruby versions were not tested, but in theory Ruby 2.2.x should work fine.
License
The project uses the Zlib License. See LICENCE.txt file for more information.