Class: RSAC::Conditions::PseudoClassCondition

Inherits:
AttributeCondition show all
Defined in:
lib/antisamy/csspool/rsac/sac/conditions/pseudo_class_condition.rb

Instance Attribute Summary

Attributes inherited from AttributeCondition

#local_name, #specified, #value

Attributes inherited from Condition

#condition_type

Instance Method Summary collapse

Methods inherited from AttributeCondition

#==, build, #hash

Methods inherited from Condition

#==, #eql?, #hash

Constructor Details

#initialize(pseudo_class) ⇒ PseudoClassCondition

Returns a new instance of PseudoClassCondition.



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

def initialize(pseudo_class)
  super(nil, pseudo_class, false, :SAC_PSEUDO_CLASS_CONDITION)
end

Instance Method Details

#specificityObject



15
16
17
# File 'lib/antisamy/csspool/rsac/sac/conditions/pseudo_class_condition.rb', line 15

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

#to_cssObject



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

def to_css
  ":#{value}"
end

#to_xpathObject



12
13
# File 'lib/antisamy/csspool/rsac/sac/conditions/pseudo_class_condition.rb', line 12

def to_xpath
end