NAME tagz.rb SYNOPSIS require Tagz include Tagz.globally a_(:href => "/foo"){ "bar" } #=> bar DESCRIPTION tagz.rb is generates html, xml, or any sgml variant like a small ninja running across the backs of a herd of giraffes swatting of heads like a mark-up weedwacker. weighing in at less than 200 lines of code tagz.rb adds an html syntax to ruby that is both unobtrusive, safe, and available globally to objects without the need for any builder or superfluous objects. tagz.rb is designed for applications that generate html to be able to do so easily in any context without heavyweight syntax or scoping issues, like a ninja sword through butter. RAILS in config/environment.rb require 'tagz' in a helper def list_of_users ul_(:class => 'users'){ @users.each{|user| li_{ user }} } end in a view <%= table_{ rows.each do |row| tr_{ row.each do |cell| td_{ cell } end } end } %> in a controller def ajax_responder text = tagz{ table_{ rows.each do |row| tr_{ row.each do |cell| td_{ cell } end } end } } render :text => text end INSTALL gem install tagz HISTORY 4.4.0 - remove dependancy on cgi lib, tagz is now completely standalone 4.3.0 - detect rails and auto-include into ActionController::Base and include globally into ActionView::Base 4.2.0 - general lib cleanup - introduction of dual-mixin technique (Tagz.globally) - few small bug fixes - ninja tales SAMPLES @samples