Class Plist::Listener
In: lib/facter/util/plist/parser.rb
Parent: Object

Methods

new   tag_end   tag_start   text  

Attributes

open  [RW]  include REXML::StreamListener
result  [RW]  include REXML::StreamListener

Public Class methods

[Source]

    # File lib/facter/util/plist/parser.rb, line 37
37:     def initialize
38:       @result = nil
39:       @open   = Array.new
40:     end

Public Instance methods

[Source]

    # File lib/facter/util/plist/parser.rb, line 51
51:     def tag_end(name)
52:       last = @open.pop
53:       if @open.empty?
54:         @result = last.to_ruby
55:       else
56:         @open.last.children.push last
57:       end
58:     end

[Source]

    # File lib/facter/util/plist/parser.rb, line 43
43:     def tag_start(name, attributes)
44:       @open.push PTag::mappings[name].new
45:     end

[Source]

    # File lib/facter/util/plist/parser.rb, line 47
47:     def text( contents )
48:       @open.last.text = contents if @open.last
49:     end

[Validate]