class Swifterate::PList

Public Class Methods

new(file) click to toggle source
# File lib/swifterate/plist.rb, line 8
def initialize(file)
  plist = CFPropertyList::List.new(file: file)
  @data = CFPropertyList.native_types(plist.value)
end

Public Instance Methods

keys() click to toggle source
# File lib/swifterate/plist.rb, line 13
def keys
  @data.keys
end
members() click to toggle source
# File lib/swifterate/plist.rb, line 17
def members
  Helper.enum_members(keys)
end
swift_enum(name = "InfoPlist") click to toggle source
# File lib/swifterate/plist.rb, line 21
def swift_enum(name = "InfoPlist")
  template_file = File.join(File.dirname(__FILE__), 'templates/InfoPlist.swift.mustache')
  Mustache.render(File.read(template_file), name: name, members: members)
end