Class: Duxml::ChangeClass
- Inherits:
-
PatternClass
- Object
- PatternClass
- Duxml::ChangeClass
- Includes:
- Change
- Defined in:
- lib/duxml/meta/history/change.rb
Overview
do not use - only for subclassing changes represent events i.e. patterns with a fixed position in time, and can include qualification and validation errors
Direct Known Subclasses
AddClass, ChangeAttrClass, ChangeTextClass, ErrorClass, NewAttrClass, NewTextClass, RemoveClass, UndoClass
Constant Summary
Constants included from Duxml
Constants included from Meta
Instance Attribute Summary collapse
-
#time_stamp ⇒ Object
readonly
Returns the value of attribute time_stamp.
Attributes inherited from PatternClass
Attributes included from Duxml
Attributes included from Saxer
Instance Method Summary collapse
-
#initialize(_subject, *args) ⇒ ChangeClass
constructor
all subclasses of Change must call this super method or implement the same function within their #initialize.
Methods included from Change
#<=>, #abstract?, #description, #line
Methods included from Pattern
#<=>, #abstract?, #concrete?, #description, #name, #object, #relationship, #simple_name
Methods included from Duxml
#create, #load, #log, #relaxng, #save, #validate
Methods included from Meta
Methods included from Saxer
Constructor Details
#initialize(_subject, *args) ⇒ ChangeClass
all subclasses of Change must call this super method or implement the same function within their #initialize
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/duxml/meta/history/change.rb', line 18 def initialize(_subject, *args) super _subject @time_stamp = Time.now args.each do |arg| if arg.is_a?(Duxml::Element) @object = arg break end end end |
Instance Attribute Details
#time_stamp ⇒ Object (readonly)
Returns the value of attribute time_stamp.
29 30 31 |
# File 'lib/duxml/meta/history/change.rb', line 29 def time_stamp @time_stamp end |