class AppInfo::Framework
iOS Framework
parser
Attributes
file[R]
Public Class Methods
new(file)
click to toggle source
# File lib/app_info/ipa/framework.rb, line 24 def initialize(file) @file = file end
parse(path, name = 'Frameworks')
click to toggle source
# File lib/app_info/ipa/framework.rb, line 10 def self.parse(path, name = 'Frameworks') files = Dir.glob(File.join(path, name.to_s, '*')) return [] if files.empty? files.sort.each_with_object([]) do |file, obj| obj << new(file) end end
Public Instance Methods
info()
click to toggle source
# File lib/app_info/ipa/framework.rb, line 43 def info @info ||= InfoPlist.new(File.join(file, 'Info.plist')) end
lib?()
click to toggle source
# File lib/app_info/ipa/framework.rb, line 39 def lib? File.file?(file) end
macho()
click to toggle source
# File lib/app_info/ipa/framework.rb, line 32 def macho return unless lib? require 'macho' MachO.open(file) end
name()
click to toggle source
# File lib/app_info/ipa/framework.rb, line 28 def name File.basename(file) end
to_s()
click to toggle source
# File lib/app_info/ipa/framework.rb, line 47 def to_s "<#{self.class}:#{object_id} @name=#{name}>" end