Class: Plist::PData

Inherits:
PTag
  • Object
show all
Defined in:
lib/searchlink/plist.rb

Instance Attribute Summary

Attributes inherited from PTag

#children, #text

Instance Method Summary collapse

Methods inherited from PTag

inherited, #initialize, mappings

Constructor Details

This class inherits a constructor from Plist::PTag

Instance Method Details

#to_rubyObject



192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/searchlink/plist.rb', line 192

def to_ruby
  data = Base64.decode64(text.gsub(/\s+/, ""))

  begin
    Marshal.load(data)
  rescue Exception
    io = StringIO.new
    io.write data
    io.rewind
    io
  end
end