Class: CSS::SAC::Selectors::SimpleSelector

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

Instance Attribute Summary

Attributes inherited from Selector

#selector_type

Instance Method Summary collapse

Methods inherited from Selector

#==, #=~, #eql?, #hash

Methods included from Visitable

#accept

Constructor Details

#initialize(selector_type = :SAC_ANY_NODE_SELECTOR) ⇒ SimpleSelector

Returns a new instance of SimpleSelector.



7
8
9
# File 'lib/css/sac/selectors/simple_selector.rb', line 7

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

Instance Method Details

#specificityObject



19
20
21
# File 'lib/css/sac/selectors/simple_selector.rb', line 19

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

#to_cssObject



11
12
13
# File 'lib/css/sac/selectors/simple_selector.rb', line 11

def to_css
  '*'
end

#to_xpathObject



15
16
17
# File 'lib/css/sac/selectors/simple_selector.rb', line 15

def to_xpath
  "//*"
end