Tag *this*.
authorPete Elmore <1337p337@gmail.com>
Sat, 8 Nov 2008 21:50:12 +0000 (13:50 -0800)
committerPete Elmore <1337p337@gmail.com>
Sat, 8 Nov 2008 21:50:12 +0000 (13:50 -0800)
Also, TODO, have html2hoshi run a simple regex to make sure the tags are all
valid.

lib/hoshi/view.rb

index c4ea3887d0c566c62966897ebbd029459732fef0..14a7f75189c29a8cf568dc84116376fe9aec5295 100644 (file)
@@ -114,6 +114,12 @@ module Hoshi
                        end
                end
 
+               # Appends a tag to the current document, for when a tag is only needed
+               # once or has a name that is not a valid method name.
+               def tag(tname, close_type = nil, inside = nil, opts = {})
+                       append! Tag.new(tname, close_type).render(inside, opts)
+               end
+
                # Appends something to the document.  The comment, decl, and various
                # tag methods call this.
                def append! x