You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Michel Blanc edited this page Aug 11, 2012
·
1 revision
{Ramaze::Gestalt} is a utility class that can help you
writing html programatically, so you don't have to "stuff" a String with
HTML, or use here documents.
Here is the above code, revisited with Ramaze:Gestalt
defgenerate(current=nil)# Generate some HTML that will make create the side barsidebar=Ramaze::Gestalt.newsidebar.div(:class=>"sd")dosidebar.h1"This is a sidebar"sidebar.uldosidebar.li"First item"sidebar.li"Second item"endendsidebar.to_send
You can also use the Gestalt builder, which is a bit less verbose :
defgenerate(current=nil)# Generate some HTML that will make the side barsidebar=Ramaze::Gestalt.builddodiv(:class=>"sd")doh1"This is a sidebar"uldoli"First item"li"Second item"endendendend