Class: Mustermann::Visualizer::Highlight
- Inherits:
-
Object
- Object
- Mustermann::Visualizer::Highlight
- Defined in:
- lib/mustermann/visualizer/highlight.rb
Overview
Meta class for highlight objects.
Instance Method Summary collapse
-
#stylesheet(**options) ⇒ String
Stylesheet for HTML output from the pattern.
-
#to_ansi(**options) ⇒ String
ANSI colorized version of the pattern.
-
#to_hansi_template(**options) ⇒ String
Hansi template representation of the pattern.
-
#to_html(**options) ⇒ String
HTML rendering of the pattern.
-
#to_pattern ⇒ Mustermann::Pattern
The pattern used to create the highlight object.
-
#to_s ⇒ String
String representation of the pattern.
-
#to_sexp(**options) ⇒ String
S-expression like representation of the pattern.
Instance Method Details
#stylesheet(**options) ⇒ String
Returns stylesheet for HTML output from the pattern.
120 121 122 |
# File 'lib/mustermann/visualizer/highlight.rb', line 120 def stylesheet(**) Renderer::HTML.new(self, **).stylesheet end |
#to_ansi(**options) ⇒ String
Returns ANSI colorized version of the pattern.
79 80 81 |
# File 'lib/mustermann/visualizer/highlight.rb', line 79 def to_ansi(**) render_with(Renderer::ANSI, **) end |
#to_hansi_template(**options) ⇒ String
Returns Hansi template representation of the pattern.
66 67 68 |
# File 'lib/mustermann/visualizer/highlight.rb', line 66 def to_hansi_template(**) render_with(Renderer::HansiTemplate, **) end |
#to_html(**options) ⇒ String
Returns HTML rendering of the pattern.
92 93 94 |
# File 'lib/mustermann/visualizer/highlight.rb', line 92 def to_html(**) render_with(Renderer::HTML, **) end |
#to_pattern ⇒ Mustermann::Pattern
Returns the pattern used to create the highlight object.
110 111 112 |
# File 'lib/mustermann/visualizer/highlight.rb', line 110 def to_pattern pattern end |
#to_s ⇒ String
Returns string representation of the pattern.
115 116 117 |
# File 'lib/mustermann/visualizer/highlight.rb', line 115 def to_s pattern.to_s end |
#to_sexp(**options) ⇒ String
Returns s-expression like representation of the pattern.
105 106 107 |
# File 'lib/mustermann/visualizer/highlight.rb', line 105 def to_sexp(**) render_with(Renderer::Sexp, **) end |