Skip to content

mportiz08/html_writer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

html_writer

a small DSL for writing HTML

usage

HtmlWriter.new.write do |html|
  html.doctype 5
  html.head do |head|
    head.title 'foobar'
  end
  html.body do |body|
    body.p 'hello, world'
  end
end
<!DOCTYPE html>
<html>
<head>
  <title>foobar</title>
</head>
<body>
  <p>hello, world</p>
</body>
</html>

todo

  • support other doctypes besides html5

About

a small DSL for writing html

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages