Class: Prawn::SVG::CSS::Stylesheets

Inherits:
Object
  • Object
show all
Defined in:
lib/prawn/svg/css/stylesheets.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(css_parser, root, media = :all) ⇒ Stylesheets

Returns a new instance of Stylesheets.



5
6
7
8
9
# File 'lib/prawn/svg/css/stylesheets.rb', line 5

def initialize(css_parser, root, media = :all)
  @css_parser = css_parser
  @root = root
  @media = media
end

Instance Attribute Details

#css_parserObject (readonly)

Returns the value of attribute css_parser.



3
4
5
# File 'lib/prawn/svg/css/stylesheets.rb', line 3

def css_parser
  @css_parser
end

#mediaObject (readonly)

Returns the value of attribute media.



3
4
5
# File 'lib/prawn/svg/css/stylesheets.rb', line 3

def media
  @media
end

#rootObject (readonly)

Returns the value of attribute root.



3
4
5
# File 'lib/prawn/svg/css/stylesheets.rb', line 3

def root
  @root
end

Instance Method Details

#loadObject



11
12
13
14
15
# File 'lib/prawn/svg/css/stylesheets.rb', line 11

def load
  load_style_elements
  xpath_styles = gather_xpath_styles
  associate_xpath_styles_with_elements(xpath_styles)
end