Class: Rouge::CSSTheme

Inherits:
Theme
  • Object
show all
Defined in:
lib/rouge/theme.rb

Instance Method Summary collapse

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