= GEM: iron-web Written by Rob Morris @ Irongaze Consulting LLC (http://irongaze.com) == DESCRIPTION A set of classes useful in the generation of HTML content. == CLASSES * Url - a url parsing and manipulation class >> url = Url.build('/home') >> url.to_s => '/home' >> url.params[:key] = 'some value' >> url.to_s => '/home?key=some+value' >> url.make_absolute(false, 'google.com') => 'http://google.com/home?key=some+value' * Color - an RGB/A color manipulation class, useful in generating CSS etc. >> rgb('#f00').to_s # Parse a color string into a Color then render it => '#FF0000' >> rgb('#f00').darken(0.5).to_s # Darken bright red 50% => '#800000' >> rgb('#f00').blend('#0f0', 0.5).to_s # Blend pure red and pure green, get medium yellow => "#807F00" * Html / Html::Element - a builder-syntax HTML generation class set >> html = Html.build do |html| >> html.div(:id => 'primary') { >> html.h1('Title-town!') >> } >> html.div(:id => 'secondary') {|div| >> div.style = 'text-align: center;' >> div.text! "My body text..." >> } >> end >> puts html =>