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