Class: CSSPool::Selectors::Simple

Inherits:
Node
  • Object
show all
Defined in:
lib/csspool/selectors/simple.rb

Direct Known Subclasses

Type, Universal

Constant Summary collapse

NO_COMBINATOR =
0
DESCENDENT =
1
PRECEDED_BY =
2
CHILD =
3

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#==, #accept, #children, #each, #hash, #to_css, #to_minified_css

Constructor Details

#initialize(name, combinator = nil) ⇒ Simple

Returns a new instance of Simple.



14
15
16
17
18
19
# File 'lib/csspool/selectors/simple.rb', line 14

def initialize name, combinator = nil
  @name                 = name
  @combinator           = combinator
  @parse_location       = nil
  @additional_selectors = []
end

Instance Attribute Details

#additional_selectorsObject

Returns the value of attribute additional_selectors.



11
12
13
# File 'lib/csspool/selectors/simple.rb', line 11

def additional_selectors
  @additional_selectors
end

#combinatorObject

Returns the value of attribute combinator.



12
13
14
# File 'lib/csspool/selectors/simple.rb', line 12

def combinator
  @combinator
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/csspool/selectors/simple.rb', line 9

def name
  @name
end

#parse_locationObject

Returns the value of attribute parse_location.



10
11
12
# File 'lib/csspool/selectors/simple.rb', line 10

def parse_location
  @parse_location
end