Class: Radius::Scanner

Inherits:
Object
  • Object
show all
Defined in:
lib/radius/parser/scanner.rb

Instance Method Summary collapse

Instance Method Details

#operate(prefix, data) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/radius/parser/scanner.rb', line 9

def operate(prefix, data)
  buf = ""
  csel = ""
  @prematch = ''
  @starttag = nil
  @attrs = {}
  @flavor = :tasteless
  @cursor = 0
  @tagstart = 0
  @nodes = ['']
  remainder = data.dup

  until remainder.length == 0
    p = perform_parse(prefix, remainder)
    remainder = remainder[p..-1]
  end

  return @nodes
end