Integrates Atom with Seeing Is Believing, allowing Ruby programs to show you the result of each line of code that was evaluated.
Here is an example session:
Here is a longer video that goes into more details.
Command+Option+Bto annotate every line
Command+Option+Nto annotate just marked lines (mark them by placing
# =>after them, or below them)
Command+Option+Vto remove annotations
Snippets (use SiB to play around with ideas without needing a complex environment):
s_arbin-memory ActiveRecord::Base code, so you can play with models without Rails.
s_sinatraExample Sinatra app with Rack-style invocation setup for you to play with.
s_nokogiriParse html, play with css selectors, etc.
s_reflectionExamples of useful reflection tools.
Or, you can do it from the command line
$ apm install seeing-is-believing
This integrates into your specific environment, it doesn't come with the gem loaded by default. Install it by getting into the environment you want, and running:
$ gem install seeing_is_believing$ seeing_is_believing -e '1 + 1' # to check that it worked
If you use rbenv, you may need to
$ rbenv rehash
Atom loads your environment by launching a new shell and copying its environment
variables into Atom's environment variables. So, assuming that your shell sets
your Ruby, then everything should just work. Note that it looks
SHELL environment variable to decide what shell to use
(you can change yours with
seeing_is_believing is not available by default in a new shell (perhaps
because it's not located in a
$PATH directory, or your Ruby environment needs
some fancier setup) then you can use the "Seeing is believing command"
configuration option to either change the name or pass an absolute path to a
script you wrote. This allows you total control over how to set it up.
I've used this to setup non-standard environments and then exec SiB.
When I want to try features from my development SiB, I set mine to
You can get a full list of flags by running
The most common and useful ones are going to be:
Copyright (C) 2014 Josh Cheek <email@example.com> This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.