0.0
No commit activity in last 3 years
No release in over 3 years
Powers System Browser Client, which is a desktop application that displays information about Ruby classes and modules, showing both methods and their source code.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.9
~> 0.10
~> 10.4

Runtime

 Project Readme

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.