Class: RSAC::Conditions::BeginHyphenCondition
- Inherits:
-
AttributeCondition
- Object
- Condition
- AttributeCondition
- RSAC::Conditions::BeginHyphenCondition
- Defined in:
- lib/antisamy/csspool/rsac/sac/conditions/begin_hyphen_condition.rb
Instance Attribute Summary
Attributes inherited from AttributeCondition
#local_name, #specified, #value
Attributes inherited from Condition
Instance Method Summary collapse
-
#initialize(local_name, value) ⇒ BeginHyphenCondition
constructor
A new instance of BeginHyphenCondition.
- #to_css ⇒ Object
- #to_xpath ⇒ Object
Methods inherited from AttributeCondition
#==, build, #hash, #specificity
Methods inherited from Condition
Constructor Details
#initialize(local_name, value) ⇒ BeginHyphenCondition
Returns a new instance of BeginHyphenCondition.
5 6 7 |
# File 'lib/antisamy/csspool/rsac/sac/conditions/begin_hyphen_condition.rb', line 5 def initialize(local_name, value) super(local_name, value, true, :SAC_BEGIN_HYPHEN_ATTRIBUTE_CONDITION) end |
Instance Method Details
#to_css ⇒ Object
9 10 11 |
# File 'lib/antisamy/csspool/rsac/sac/conditions/begin_hyphen_condition.rb', line 9 def to_css "[#{local_name}|=#{value}]" end |
#to_xpath ⇒ Object
13 14 15 |
# File 'lib/antisamy/csspool/rsac/sac/conditions/begin_hyphen_condition.rb', line 13 def to_xpath "[contains(@#{local_name}, '#{value}')]" end |