Simlpe DSL for creating HTML markup in Ruby
git clone https://github.com/dmproger/html_builder
cd html_builder
ruby main.rb
# you are in pwd of cloned repo:
require_relative 'lib/html'
HTML.h1 'Svg example'
HTML.div do
HTML.svg 300, 200 do
HTML.rect 100, 50, 10, 20
end
end
HTML.p 'Have a nice day!'
Output for non-block tags in block:
HTML.div do
HTML.p 'hello' # <- that one
HTML.div do
HTML.p 'world'
end
end
Pending..