Class: Prawn::SVG::CSS::Stylesheets
- Inherits:
-
Object
- Object
- Prawn::SVG::CSS::Stylesheets
- Defined in:
- lib/prawn/svg/css/stylesheets.rb
Instance Attribute Summary collapse
-
#css_parser ⇒ Object
readonly
Returns the value of attribute css_parser.
-
#media ⇒ Object
readonly
Returns the value of attribute media.
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
-
#initialize(css_parser, root, media = :all) ⇒ Stylesheets
constructor
A new instance of Stylesheets.
- #load ⇒ Object
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_parser ⇒ Object (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 |
#media ⇒ Object (readonly)
Returns the value of attribute media.
3 4 5 |
# File 'lib/prawn/svg/css/stylesheets.rb', line 3 def media @media end |
#root ⇒ Object (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
#load ⇒ Object
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 |