Class: HtmlSurgeon::Changes::AddCssClass
- Inherits:
-
HtmlSurgeon::Change
- Object
- HtmlSurgeon::Change
- HtmlSurgeon::Changes::AddCssClass
- Defined in:
- lib/html_surgeon/changes/add_css_class.rb
Defined Under Namespace
Modules: ChangeSetMethods
Constant Summary collapse
- AUDIT_TYPE =
:add_css_class- CLASS_ATTRIBUTE =
'class'.freeze
- CLASS_SEPARATOR =
' '.freeze
- CLASS_XPATH =
'.//@class'
Instance Attribute Summary collapse
-
#css_class ⇒ Object
readonly
Returns the value of attribute css_class.
Attributes inherited from HtmlSurgeon::Change
Instance Method Summary collapse
-
#initialize(css_class:, **other) ⇒ AddCssClass
constructor
A new instance of AddCssClass.
- #log ⇒ Object
Methods inherited from HtmlSurgeon::Change
#apply, #auditor_class, inherited
Constructor Details
#initialize(css_class:, **other) ⇒ AddCssClass
Returns a new instance of AddCssClass.
12 13 14 15 16 |
# File 'lib/html_surgeon/changes/add_css_class.rb', line 12 def initialize(css_class:, **other) @css_class = css_class super **other end |
Instance Attribute Details
#css_class ⇒ Object (readonly)
Returns the value of attribute css_class.
10 11 12 |
# File 'lib/html_surgeon/changes/add_css_class.rb', line 10 def css_class @css_class end |
Instance Method Details
#log ⇒ Object
18 19 20 |
# File 'lib/html_surgeon/changes/add_css_class.rb', line 18 def log "add css class #{css_class}" end |