The `item` method accepts a block, which is rendered in the navigation `li > a` tag.
class Nav < Phlex::HTML
def view_template(&content)
nav(class: "main-nav") { ul(&content) }
end
def item(url, &content)
li { a(href: url, &content) }
end
end
render Nav.new do |it|
it.item("/") { "Home" }
it.item("/about") { "About" }
it.item("/contact") { "Contact" }
end