Sha256: 4fb852c6885e36830327b48a7f4acbe6bf4c04406187036822cd76f73614b8c0

Contents?: true

Size: 589 Bytes

Versions: 14

Compression:

Stored size: 589 Bytes

Contents

begin
  require 'cfpropertylist'
rescue LoadError
  require 'rubygems'
  require 'cfpropertylist'
end

# Adds to_rb functionality to return native ruby types rather than CFTypes
module CFPropertyList
  class CFDictionary
    def to_rb
      hash_data = {}
      value.keys.each do |key|
        hash_data[key] = value[key].to_hash
      end
      hash_data
    end
  end
  class CFType
    def to_hash
      self.value
    end
  end
  class CFArray
    def to_hash
      hash_data = []
      value.each do |obj|
        hash_data << obj.to_hash
      end
      hash_data
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
read_ipa-0.5.0 lib/read_ipa/plist_binary.rb
read_ipa-0.4.0 lib/read_ipa/plist_binary.rb
read_ipa-0.3.1 lib/read_ipa/plist_binary.rb
read_ipa-0.3.0 lib/read_ipa/plist_binary.rb
read_ipa-0.2.1 lib/read_ipa/plist_binary.rb
read_ipa-0.2.0 lib/read_ipa/plist_binary.rb
read_ipa-0.1.2 lib/read_ipa/plist_binary.rb
read_ipa-0.1.1 lib/read_ipa/plist_binary.rb
read_ipa-0.1.0 lib/read_ipa/plist_binary.rb
read_ipa-0.0.3 lib/read_ipa/plist_binary.rb
read_ipa-0.0.2 lib/read_ipa/plist_binary.rb
ipa_reader-0.7.1 lib/ipa_reader/plist_binary.rb
ipa_reader-0.7.1.rc lib/ipa_reader/plist_binary.rb
ipa_reader-0.7.0 lib/ipa_reader/plist_binary.rb