Class: Rouge::CSSTheme
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ CSSTheme
constructor
A new instance of CSSTheme.
- #render(&b) ⇒ Object
Methods inherited from Theme
find, get_style, name, palette, registry, render, style, #styles, styles
Constructor Details
#initialize(opts = {}) ⇒ CSSTheme
Returns a new instance of CSSTheme.
160 161 162 |
# File 'lib/rouge/theme.rb', line 160 def initialize(opts={}) @scope = opts[:scope] || '.highlight' end |
Instance Method Details
#render(&b) ⇒ Object
164 165 166 167 168 169 170 |
# File 'lib/rouge/theme.rb', line 164 def render(&b) return enum_for(:render).to_a.join("\n") unless b styles.each do |tokname, style| style.render(css_selector(Token[tokname]), &b) end end |