Module: Duxml::ChangeText

Included in:
ChangeTextClass
Defined in:
lib/duxml/meta/history/change_text.rb,
lib/duxml/meta/history/change_text.rb

Instance Method Summary collapse

Instance Method Details

#descriptionString

Returns self description.

Returns:

  • (String)

    self description



24
25
26
# File 'lib/duxml/meta/history/change_text.rb', line 24

def description
  "#{super} #{subject.description}'s text at index #{index} changed from '#{old_text}' to '#{text}'."
end

#textString

Returns new content (subsequent changes may mean this new content no longer exists in its original form!).

Returns:

  • (String)

    new content (subsequent changes may mean this new content no longer exists in its original form!)



29
30
31
# File 'lib/duxml/meta/history/change_text.rb', line 29

def text
  subject.nodes[index]
end