Class: Radius::PacketParser

Inherits:
Parser
  • Object
show all
Defined in:
lib/orange-more/slices/resources/radius.rb

Overview

The Radius parser. Initialize a parser with a Context object that defines how tags should be expanded. See the QUICKSTART for a detailed explaination of its usage.

Instance Method Summary collapse

Instance Method Details

#parse(string, packet = false) ⇒ Object



52
53
54
55
56
57
# File 'lib/orange-more/slices/resources/radius.rb', line 52

def parse(string, packet = false)
  @stack = [ParseContainerTag.new { |t| t.contents.to_s }]
  tokenize(string)
  stack_up(packet)
  @stack.last.to_s
end