Skip to content

Instantly share code, notes, and snippets.

@rawsyntax
Last active December 18, 2015 17:19
Show Gist options
  • Select an option

  • Save rawsyntax/5817958 to your computer and use it in GitHub Desktop.

Select an option

Save rawsyntax/5817958 to your computer and use it in GitHub Desktop.
markaby builder example
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