Class: CSSPool::CSS::RuleSet
- Inherits:
-
Struct
- Object
- Struct
- CSSPool::CSS::RuleSet
- Includes:
- Visitable
- Defined in:
- lib/csspool/css/rule_set.rb
Instance Attribute Summary collapse
-
#declarations ⇒ Object
Returns the value of attribute declarations.
-
#media ⇒ Object
Returns the value of attribute media.
-
#selectors ⇒ Object
Returns the value of attribute selectors.
Instance Method Summary collapse
-
#initialize(selectors, declarations = [], media = []) ⇒ RuleSet
constructor
A new instance of RuleSet.
Methods included from Visitable
#==, #accept, #children, #each, #hash, #to_css
Constructor Details
#initialize(selectors, declarations = [], media = []) ⇒ RuleSet
Returns a new instance of RuleSet.
6 7 8 9 |
# File 'lib/csspool/css/rule_set.rb', line 6 def initialize selectors, declarations = [], media = [] selectors.each { |sel| sel.rule_set = self } super end |
Instance Attribute Details
#declarations ⇒ Object
Returns the value of attribute declarations
3 4 5 |
# File 'lib/csspool/css/rule_set.rb', line 3 def declarations @declarations end |
#media ⇒ Object
Returns the value of attribute media
3 4 5 |
# File 'lib/csspool/css/rule_set.rb', line 3 def media @media end |
#selectors ⇒ Object
Returns the value of attribute selectors
3 4 5 |
# File 'lib/csspool/css/rule_set.rb', line 3 def selectors @selectors end |