Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/dom.rb
Instance Method Summary collapse
Instance Method Details
#dom(tag, attr = {}) ⇒ Object
88 89 90 91 92 |
# File 'lib/dom.rb', line 88 def dom tag, attr = {} "<#{Dom.hyphenize(tag)}#{Dom.attr(attr)}>"\ "#{Dom.join(self, tag)}"\ "</#{Dom.hyphenize(tag)}>".escaped end |
#jsonml(tag, attr = nil) ⇒ Object
93 |
# File 'lib/dom.rb', line 93 def jsonml tag, attr = nil; [Dom.hyphenize(tag), *([Dom.json_attr(attr)] if attr), *self] end |