Class: Rouge::CSSTheme

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

Instance Method Summary collapse

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