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