[TxMt] Ruby Evaluate Bundle
Daniel Harple
dharple at generalconsumption.org
Fri Apr 28 18:00:58 UTC 2006
Here is a useful bundle for testing out ruby snippets. It includes a
script from eigenclass.org[1].
⌘= insert/remove an eval marker for the current line
⌘E evaluates and annotate the file according to the markers
If there are errors they are placed at the end of the file.
Examples (after eval):
(1..10).each do |i|
i ** i # => 1, 4, 27, 256, 3125, 46656, 823543, 16777216,
387420489, 10000000000
end
(1..10).to_a # => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Unfortunately you can't do something like this:
(1..10).each do |i|
i ** i
end # =>
[1]: http://eigenclass.org/hiki.rb?xmp+redux%3A+expanding+test
+assertions+for+profit
-- Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Ruby Evaluate.tmbundle.zip
Type: application/zip
Size: 3622 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20060428/ad379a54/attachment.zip>
More information about the textmate
mailing list