Class: CSS::StyleSheet::Rule

Inherits:
Object
  • Object
show all
Defined in:
lib/css/stylesheet/rule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(selector, properties = []) ⇒ Rule

Returns a new instance of Rule.



6
7
8
9
# File 'lib/css/stylesheet/rule.rb', line 6

def initialize(selector, properties = [])
  @selector = selector
  @properties = Set.new(properties)
end

Instance Attribute Details

#propertiesObject

Returns the value of attribute properties.



5
6
7
# File 'lib/css/stylesheet/rule.rb', line 5

def properties
  @properties
end

#selectorObject

Returns the value of attribute selector.



5
6
7
# File 'lib/css/stylesheet/rule.rb', line 5

def selector
  @selector
end