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, name, palette, registry, style, #styles, styles
Constructor Details
#initialize(opts = {}) ⇒ CSSTheme
Returns a new instance of CSSTheme.
141 142 143 |
# File 'lib/rouge/theme.rb', line 141 def initialize(opts={}) @scope = opts[:scope] || '.highlight' end |
Instance Method Details
#render(&b) ⇒ Object
145 146 147 148 149 150 151 |
# File 'lib/rouge/theme.rb', line 145 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 |