Class: Duxml::HistoryClass

Inherits:
Object show all
Extended by:
Forwardable
Includes:
History
Defined in:
lib/duxml/meta/history.rb

Overview

as an object, HistoryClass holds events latest first, earliest last it also has delegators that allow the use of Array-style notation e.g. ‘[]’ and #each to search the history.

Constant Summary

Constants included from Duxml

DITA_GRAMMAR

Constants included from Meta

Meta::FILE_EXT

Instance Attribute Summary collapse

Attributes included from Duxml

#doc, #file, #meta

Attributes included from Saxer

#io

Instance Method Summary collapse

Methods included from History

#description, #grammar, #inspect, #latest, #strict?, #update, xml

Methods included from Reportable

#add_observer

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(harsh_or_kind = true) ⇒ HistoryClass

Returns a new instance of HistoryClass.

Parameters:

  • harsh_or_kind (Boolean) (defaults to: true)

    by default harsh i.e. true so that if this History detects an error it will raise an Exception; otherwise not



31
32
33
34
# File 'lib/duxml/meta/history.rb', line 31

def initialize(harsh_or_kind = true)
  @nodes = []
  @strict = harsh_or_kind
end

Instance Attribute Details

#nodesObject (readonly) Also known as: events

Returns the value of attribute nodes.



36
37
38
# File 'lib/duxml/meta/history.rb', line 36

def nodes
  @nodes
end