Class: RSAC::Selectors::SimpleSelector

Inherits:
Selector
  • Object
show all
Defined in:
lib/antisamy/csspool/rsac/sac/selectors/simple_selector.rb

Instance Attribute Summary

Attributes inherited from Selector

#selector_type

Instance Method Summary collapse

Methods inherited from Selector

#==, #eql?, #hash

Constructor Details

#initialize(selector_type = :SAC_ANY_NODE_SELECTOR) ⇒ SimpleSelector

Returns a new instance of SimpleSelector.



4
5
6
# File 'lib/antisamy/csspool/rsac/sac/selectors/simple_selector.rb', line 4

def initialize(selector_type=:SAC_ANY_NODE_SELECTOR)
  super(selector_type)
end

Instance Method Details

#specificityObject



16
17
18
# File 'lib/antisamy/csspool/rsac/sac/selectors/simple_selector.rb', line 16

def specificity
  [0, 0, 0, 0]
end

#to_cssObject



8
9
10
# File 'lib/antisamy/csspool/rsac/sac/selectors/simple_selector.rb', line 8

def to_css
  '*'
end

#to_xpathObject



12
13
14
# File 'lib/antisamy/csspool/rsac/sac/selectors/simple_selector.rb', line 12

def to_xpath
  "//*"
end