Class: CSSPool::CSS::ImportRule
- Inherits:
-
Struct
- Object
- Struct
- CSSPool::CSS::ImportRule
- Includes:
- Visitable
- Defined in:
- lib/csspool/css/import_rule.rb
Instance Attribute Summary collapse
-
#document ⇒ Object
Returns the value of attribute document.
-
#media ⇒ Object
Returns the value of attribute media.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#parse_location ⇒ Object
Returns the value of attribute parse_location.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
Methods included from Visitable
#==, #accept, #children, #each, #hash, #to_css
Instance Attribute Details
#document ⇒ Object
Returns the value of attribute document
3 4 5 |
# File 'lib/csspool/css/import_rule.rb', line 3 def document @document end |
#media ⇒ Object
Returns the value of attribute media
3 4 5 |
# File 'lib/csspool/css/import_rule.rb', line 3 def media @media end |
#namespace ⇒ Object
Returns the value of attribute namespace
3 4 5 |
# File 'lib/csspool/css/import_rule.rb', line 3 def namespace @namespace end |
#parse_location ⇒ Object
Returns the value of attribute parse_location
3 4 5 |
# File 'lib/csspool/css/import_rule.rb', line 3 def parse_location @parse_location end |
#uri ⇒ Object
Returns the value of attribute uri
3 4 5 |
# File 'lib/csspool/css/import_rule.rb', line 3 def uri @uri end |
Instance Method Details
#load ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/csspool/css/import_rule.rb', line 6 def load new_doc = CSSPool.CSS yield(uri) new_doc.parent_import_rule = self new_doc.parent = document new_doc.rule_sets.each { |rs| rs.media = media } new_doc end |