Method: Plist::PDict#to_ruby

Defined in:
lib/plist/parser.rb

#to_rubyObject



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/plist/parser.rb', line 181

def to_ruby
  dict = {}
  key = nil

  children.each do |c|
    if key.nil?
      key = c.to_ruby
    else
      dict[key] = c.to_ruby
      key = nil
    end
  end

  dict
end