Method: Helper::Helper#tag

Defined in:
lib/helper/helper.rb

#tag(sym, content = "", attrs = {}) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/helper/helper.rb', line 23

def tag(sym, content = "", attrs = {})
   
  # @todo FIXME
  if block_given?
    _erbout << "<#{sym.to_s} #{attributize(content)}>"        
    content = yield
    _erbout << "</#{sym.to_s}>"
  else
    "<#{sym.to_s} #{attributize(attrs)}>#{content}</#{sym.to_s}>"        
  end     
end