Last active
December 18, 2015 17:19
-
-
Save rawsyntax/5817958 to your computer and use it in GitHub Desktop.
markaby builder example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'markaby' | |
| m = Markaby::Builder.new | |
| m.div({:id => "boosh", :class => "boosh"}) do | |
| h1("boosh", {:id => "inner"}) | |
| end | |
| #=> "<div id="boosh" class="boosh"><h1 id="inner">boosh</h1></div>" | |
| m = Markaby::Builder.new | |
| m.div.boosh!.class do | |
| h1.inner!("boosh") | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment