Class: Rouge::Formatters::HTMLInline
- Inherits:
-
HTML
- Object
- Rouge::Formatter
- HTML
- Rouge::Formatters::HTMLInline
- Defined in:
- lib/rouge/formatters/html_inline.rb
Constant Summary
Constants inherited from HTML
Rouge::Formatters::HTML::TABLE_FOR_ESCAPE_HTML
Constants inherited from Rouge::Formatter
Instance Method Summary collapse
-
#initialize(theme) ⇒ HTMLInline
constructor
A new instance of HTMLInline.
- #safe_span(tok, safe_val) ⇒ Object
Methods inherited from HTML
Methods inherited from Rouge::Formatter
find, format, #format, #render, #stream, tag
Constructor Details
#initialize(theme) ⇒ HTMLInline
Returns a new instance of HTMLInline.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rouge/formatters/html_inline.rb', line 8 def initialize(theme) if theme.is_a?(Class) && theme < Rouge::Theme @theme = theme.new elsif theme.is_a?(Rouge::Theme) @theme = theme elsif theme.is_a?(String) @theme = Rouge::Theme.find(theme).new else raise ArgumentError, "invalid theme: #{theme.inspect}" end end |