Class: Duxml::ChangeAttrClass

Inherits:
ChangeClass show all
Includes:
ChangeAttr
Defined in:
lib/duxml/meta/history/change_attr.rb

Overview

created when Element has an attribute already and its value 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 ChangeAttr

#description, #value

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, _attr_name, _old_value) ⇒ ChangeAttrClass

Returns a new instance of ChangeAttrClass.

Parameters:

  • _subject (Duxml::Element)

    parent doc whose attribute changed

  • _attr_name (String)

    name of the changed attribute

  • _old_value (String)

    old attribute value



15
16
17
18
# File 'lib/duxml/meta/history/change_attr.rb', line 15

def initialize(_subject, _attr_name, _old_value)
  super _subject
  @attr_name, @old_value = _attr_name, _old_value
end

Instance Attribute Details

#attr_nameObject (readonly)

Returns the value of attribute attr_name.



20
21
22
# File 'lib/duxml/meta/history/change_attr.rb', line 20

def attr_name
  @attr_name
end

#old_valueObject (readonly)

Returns the value of attribute old_value.



20
21
22
# File 'lib/duxml/meta/history/change_attr.rb', line 20

def old_value
  @old_value
end