Class: Duxml::PatternClass

Inherits:
Object show all
Includes:
Pattern
Defined in:
lib/duxml/meta/grammar/pattern.rb

Overview

as an object, a Pattern consists of a subject and may or may not have an object a Pattern without an object represents a childless empty node with no attributes this class must be subclassed to be used; there is one for each type of XML relationship that an Element can have up to one degree of separation, that is, grandparent relationships are not considered and neither are the attributes of children

Instance Attribute Summary collapse

Attributes included from Duxml

#doc

Attributes included from Saxer

#io

Instance Method Summary collapse

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(subj) ⇒ PatternClass

Returns a new instance of PatternClass.

Parameters:

  • subj (Element)

    specific Element that is the subject of this pattern



24
25
26
# File 'lib/duxml/meta/grammar/pattern.rb', line 24

def initialize(subj)
  @subject = subj
end

Instance Attribute Details

#subjectObject (readonly)

Returns the value of attribute subject.



28
29
30
# File 'lib/duxml/meta/grammar/pattern.rb', line 28

def subject
  @subject
end