Class: Duxml::ChangeTextClass

Inherits:
ChangeClass show all
Includes:
ChangeText
Defined in:
lib/duxml/meta/history/change_text.rb

Overview

created when doc has text and text has been changed

Instance Attribute Summary collapse

Attributes inherited from ChangeClass

#time_stamp

Attributes inherited from PatternClass

#subject

Attributes included from Duxml

#doc

Attributes included from Saxer

#io

Instance Method Summary collapse

Methods included from ChangeText

#description, #text

Methods included from Change

#<=>, #abstract?, #description, #line

Methods included from Pattern

#<=>, #abstract?, #concrete?, #description, #name, #object, #relationship, #simple_name, #xml

Methods included from Duxml

#load, #log, #save, #validate

Methods included from Saxer

#sax

Constructor Details

#initialize(_subject, _index, _old_text) ⇒ ChangeTextClass

Returns a new instance of ChangeTextClass.

Parameters:

  • parent doc whose text has changed

  • index of parent’s nodes that text is found at

  • string that was replaced



14
15
16
17
# File 'lib/duxml/meta/history/change_text.rb', line 14

def initialize(_subject, _index, _old_text)
  super _subject
  @index, @old_text = _index, _old_text
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



19
20
21
# File 'lib/duxml/meta/history/change_text.rb', line 19

def index
  @index
end

#old_textObject (readonly)

Returns the value of attribute old_text.



19
20
21
# File 'lib/duxml/meta/history/change_text.rb', line 19

def old_text
  @old_text
end