Class: Duxml::ChangeClass

Inherits:
PatternClass show all
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

Constant Summary

Constants included from Duxml

DITA_GRAMMAR

Constants included from Meta

Meta::FILE_EXT

Instance Attribute Summary collapse

Attributes inherited from PatternClass

#subject

Attributes included from Duxml

#doc, #file, #meta

Attributes included from Saxer

#io

Instance Method Summary collapse

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

#grammar=, meta_path, xml

Methods included from Saxer

#sax

Constructor Details

#initialize(_subject, *args) ⇒ ChangeClass

all subclasses of Change must call this super method or implement the same function within their #initialize

Parameters:



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_stampObject (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