Sha256: 30d18d86e743be77294fe4452cf59a0487055ecc3fa92341ea0bc6ab4038e30d

Contents?: true

Size: 591 Bytes

Versions: 7

Compression:

Stored size: 591 Bytes

Contents

require 'app_info/version'
require 'app_info/parser'

#
# AppInfo Module
module AppInfo
  #
  # Get a new parser for automatic
  def self.parse(file)
    raise NotFoundError, file unless File.exist?(file)

    case File.extname(file).downcase
    when '.ipa' then Parser::IPA.new(file)
    when '.apk' then Parser::APK.new(file)
    when '.mobileprovision' then Parser::MobileProvision.new(file)
    else
      raise NotAppError, file
    end
  end
  singleton_class.send(:alias_method, :dump, :parse)

  class NotFoundError < StandardError; end
  class NotAppError < StandardError; end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
app-info-1.1.2 lib/app_info.rb
app-info-1.1.0 lib/app_info.rb
app-info-1.0.5 lib/app_info.rb
app-info-1.0.4 lib/app_info.rb
app-info-1.0.3 lib/app_info.rb
app-info-1.0.2 lib/app_info.rb
app-info-1.0.1 lib/app_info.rb