Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/dom.rb
Direct Known Subclasses
Instance Method Summary collapse
- #ansi2html ⇒ Object
- #dom(tag = nil, mounted: nil, **attr) ⇒ Object
- #dom_escaped ⇒ Object
- #jsonml(tag, attr = nil) ⇒ Object
- #mounted ⇒ Object
Instance Method Details
#ansi2html ⇒ Object
135 |
# File 'lib/dom.rb', line 135 def ansi2html; _ansi2html.dom_escaped end |
#dom(tag = nil, mounted: nil, **attr) ⇒ Object
121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/dom.rb', line 121 def dom tag = nil, mounted: nil, **attr if tag "<%s>%s</%s>".%( Dom.format(tag, attr) .insert(1, (block_given? ? yield(self) : self).dom_escape(tag)._ansi2html) ) else dom_escape end .dom_escaped.mounted_set(mounted) end |
#dom_escaped ⇒ Object
134 |
# File 'lib/dom.rb', line 134 def dom_escaped; DomString.new(self) end |
#jsonml(tag, attr = nil) ⇒ Object
132 |
# File 'lib/dom.rb', line 132 def jsonml tag, attr = nil; [*Dom.json_format(tag, attr), self] end |
#mounted ⇒ Object
133 |
# File 'lib/dom.rb', line 133 def mounted; nil end |