Class: Duxml::TextPatternClass

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

Overview

pattern representing relationship between an object and its text-only child

Instance Attribute Summary collapse

Attributes included from Duxml

#doc

Attributes included from Saxer

#io

Instance Method Summary collapse

Methods included from TextPattern

#description, #text

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, _str, _index) ⇒ TextPatternClass

Returns a new instance of TextPatternClass.

Parameters:

  • _subject (Ox::Element)

    parent of text node

  • _index (Fixnum)

    index of text node



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

def initialize(_subject, _str, _index)
  @index = _index
  @string = _str
  super _subject
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



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

def index
  @index
end

#strObject (readonly)

Returns the value of attribute str.



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

def str
  @str
end

#subjectObject (readonly)

Returns the value of attribute subject.



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

def subject
  @subject
end