Parent

Class/Module Index [+]

Quicksearch

Rouge::CSSTheme

Public Class Methods

new(opts={}) click to toggle source
# File lib/rouge/theme.rb, line 135
def initialize(opts={})
  @scope = opts[:scope] || '.highlight'
end

Public Instance Methods

render(&b) click to toggle source
# File lib/rouge/theme.rb, line 139
def render(&b)
  return enum_for(:render).to_a.join("\n") unless b

  # shared styles for tableized line numbers
  yield "#{@scope} table td { padding: 5px; }"
  yield "#{@scope} table pre { margin: 0; }"

  styles.each do |tok, style|
    style.render(css_selector(tok), &b)
  end
end
style_for(tok) click to toggle source
# File lib/rouge/theme.rb, line 151
def style_for(tok)
  self.class.get_style(tok)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.