Class: HtmlSurgeon::Changes::ReplaceTagName

Inherits:
HtmlSurgeon::Change show all
Defined in:
lib/html_surgeon/changes/replace_tag_name.rb

Constant Summary

Constants inherited from HtmlSurgeon::Change

HtmlSurgeon::Change::DATA_CHANGE_AUDIT_ATTRIBUTE

Instance Attribute Summary collapse

Attributes inherited from HtmlSurgeon::Change

#change_set

Instance Method Summary collapse

Methods inherited from HtmlSurgeon::Change

#apply

Constructor Details

#initialize(new_tag_name:, **other) ⇒ ReplaceTagName

Returns a new instance of ReplaceTagName.



6
7
8
9
10
# File 'lib/html_surgeon/changes/replace_tag_name.rb', line 6

def initialize(new_tag_name:, **other)
  @new_tag_name = new_tag_name

  super **other
end

Instance Attribute Details

#new_tag_nameObject (readonly)

Returns the value of attribute new_tag_name.



4
5
6
# File 'lib/html_surgeon/changes/replace_tag_name.rb', line 4

def new_tag_name
  @new_tag_name
end

Instance Method Details

#logObject



12
13
14
# File 'lib/html_surgeon/changes/replace_tag_name.rb', line 12

def log
  "replace tag name with #{new_tag_name}"
end