Method: Arrow::HTMLToken#to_html
- Defined in:
- lib/arrow/htmltokenizer.rb
#to_html ⇒ Object
Return an HTML fragment that can be used to represent the token symbolically in a web-based introspection interface.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/arrow/htmltokenizer.rb', line 111 def to_html content = nil if block_given? content = yield # self.log.debug "content = %p" % content else content = self.escape_html( @raw ) end tokenclass = self.css_class %q{<span class="token %s">%s</span>} % [ tokenclass, content, ] end |