Forum: Ruby ANN: InstantERB

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
92926f8e4e94ac003e911c38cc4c0d0b?d=identicon&s=25 Jack Christensen (Guest)
on 2007-03-27 05:56
(Received via mailing list)
Inspired by Florian Gross's Execute as Ruby Code Service for OS X
(http://www.ruby-forum.com/topic/102680), I have created InstantERB. It
uses the incredibly useful AutoHotKey utility. It will run any selected
text through ERB.

For example, selecting the following block of text and hitting
<Windows>+I:

The value of pi is approximately <%= Math::PI %>.

% 3.times do |i|
<%= i %>
% end

will yield:

The value of pi is approximately 3.14159265358979.

0
1
2


Installation instructions:
Install AutoHotKey (http://www.autohotkey.com/)
Download http://www.jackchristensen.com/file_download/InstantERB.ahk

You can either run InstantERB.ahk directly or copy and paste it into
your own AutoHotKey file.


Jack Christensen
This topic is locked and can not be replied to.