Class: Duxml::NewTextClass

Inherits:
ChangeClass show all
Includes:
NewText
Defined in:
lib/duxml/meta/history/new_text.rb

Overview

created when object had no children or text and text has been added

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 NewText

#description, #line_expr, #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, _str, _index) ⇒ NewTextClass

Returns a new instance of NewTextClass.

Parameters:

  • _subject (Duxml::Element)

    doc that has gained new text

  • _index (Fixnum)

    index of new text node



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

def initialize(_subject, _str, _index)
  super _subject
  @index, @str = _index, _str
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



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

def index
  @index
end

#strObject (readonly)

Returns the value of attribute str.



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

def str
  @str
end