Class: CSSPool::CSS::RuleSet
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 inherited from Node
#==, #accept, #children, #each, #hash, #to_css, #to_minified_css
Constructor Details
#initialize(selectors, declarations = [], media = []) ⇒ RuleSet
Returns a new instance of RuleSet.
8 9 10 11 12 13 14 |
# File 'lib/csspool/css/rule_set.rb', line 8 def initialize selectors, declarations = [], media = [] @selectors = selectors @declarations = declarations @media = media selectors.each { |sel| sel.rule_set = self } end |
Instance Attribute Details
#declarations ⇒ Object
Returns the value of attribute declarations.
5 6 7 |
# File 'lib/csspool/css/rule_set.rb', line 5 def declarations @declarations end |
#media ⇒ Object
Returns the value of attribute media.
6 7 8 |
# File 'lib/csspool/css/rule_set.rb', line 6 def media @media end |
#selectors ⇒ Object
Returns the value of attribute selectors.
4 5 6 |
# File 'lib/csspool/css/rule_set.rb', line 4 def selectors @selectors end |