Erbside is a simple in-line project-oriented ERB-based template system. With Erbside it is very easy to do basic templating without the need for file duplication.
Erbside also provides direct access to project metadata. It does this automatically via DotRuby, or it can be instructed to use other resources, including a project's gemspec.
Easy to use.
Uses ERB. Easy.
Uses .ruby and .gemspec. Easy.
The file is the template. Easy.
Did I mention it was easy?
In a Ruby script add an ERB comment.
module YourLibrary VERSION = "1.0.0" #:erb: VERSION="<%= version %>" end
$ erbside myscript.rb
Unless you use the –force option, Erbside will ask you if want to overwrite the file. Type y<Enter> and all of the #:erb: in-line templating will be filled in.
To see what erbside would do without actually writing to the file, use the `-o/–stdout` option.
$ erbside -o myscript.rb
To install with RubyGems simply open a console and type:
$ gem install erb
Local installation requires Setup.rb (gem install setup), then download the tarball package and type:
$ tar -xvzf erb-1.0.0.tgz $ cd erb-1.0.0.tgz $ sudo setup.rb all
Windows users use 'ruby setup.rb all'.
Copyright © 2009 Thomas Sawyer, Rubyworks. All rights reserved.
Erbside is made available according to the terms of the FreeBSD license.
See NOTICE.rdoc for details.