Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/dom.rb

Instance Method Summary collapse

Instance Method Details

#dom(tag, attr = {}) ⇒ Object



91
92
93
94
95
# File 'lib/dom.rb', line 91

def dom tag, attr = {}
	"<#{Dom.hyphenize(tag)}#{Dom.attr(attr)}>"\
	"#{Dom.join(self, tag)}"\
	"</#{Dom.hyphenize(tag)}>".escaped
end

#jsonml(tag, attr = nil) ⇒ Object



96
# File 'lib/dom.rb', line 96

def jsonml tag, attr = nil; [Dom.hyphenize(tag), *([Dom.json_attr(attr)] if attr), *self] end