Class: Duxml::AttrValPatternClass

Inherits:
PatternClass show all
Includes:
AttrValPattern
Defined in:
lib/duxml/meta/grammar/pattern/attr_val_pattern.rb

Overview

pattern representing relationship between an object’s attribute and its value

Instance Attribute Summary collapse

Attributes included from Duxml

#doc

Attributes included from Saxer

#io

Instance Method Summary collapse

Methods included from AttrValPattern

#description, #relationship, #value

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) ⇒ AttrValPatternClass

Returns a new instance of AttrValPatternClass.

Parameters:

  • _subject (Element)

    subject element

  • _attr_name (String)

    name of attribute whose value is the object of this pattern



14
15
16
17
# File 'lib/duxml/meta/grammar/pattern/attr_val_pattern.rb', line 14

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

Instance Attribute Details

#attr_nameObject (readonly)

Returns the value of attribute attr_name.



19
20
21
# File 'lib/duxml/meta/grammar/pattern/attr_val_pattern.rb', line 19

def attr_name
  @attr_name
end

#subjectObject (readonly)

Returns the value of attribute subject.



19
20
21
# File 'lib/duxml/meta/grammar/pattern/attr_val_pattern.rb', line 19

def subject
  @subject
end