File: Source.xml

package info (click to toggle)
librexml-ruby 1.2.5-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 792 kB
  • ctags: 655
  • sloc: ruby: 3,778; xml: 1,609; java: 109; makefile: 43
file content (38 lines) | stat: -rw-r--r-- 1,588 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE class>
<class name='Source'>
   A Source can be searched for patterns, and wraps buffers and other objects and provides consumption of text
  <attribute name='buffer' type='reader'>
     The current buffer (what we're going to read next)
  </attribute>
  <attribute name='line' type='reader'>
     The line number of the last consumed text
  </attribute>
  <method name='initialize'>
     Constructor 
  </method>
  <method name='scan'>
    <return>
      the pattern, if found, or nil if the Source is empty or the pattern is not found.
    </return>
     Scans the source for a given pattern.  Note, that this is not your usual scan() method.  For one thing, the pattern argument has some requirements; for another, the source can be consumed.  You can easily confuse this method.  Originally, the patterns were easier to construct and this method more robust, because this method  generated search regexes on the fly; however, this was  computationally expensive and slowed down the entire REXML package  considerably, since this is by far the most commonly called method. 
  </method>
  <method name='match'/>
  <method name='empty'>
    <return>
      true if the Source is exhausted
    </return>
     
  </method>
  <method name='current_line'>
    <return>
      the current line in the source
    </return>
     
  </method>
  <method name='encoding'>
     Taken from code contributed by Ernest Ellingson &lt;erne@powernav.com&gt;
  </method>
  <method name='utf8_enc'>
     Taken from code contributed by Ernest Ellingson &lt;erne@powernav.com&gt;
  </method>
</class>