class Fastlane::Helper::Ipa

Constants

ATTRS

Public Class Methods

new(ipa_path) click to toggle source
# File lib/fastlane/plugin/analyze_ios_ipa/helper/ipa.rb, line 9
def initialize(ipa_path)
  return nil unless ipa_path
  return nil if ipa_path.empty?
  return nil unless File.exist?(ipa_path)

  # size
  @size        = FileHelper.file_size(ipa_path)
  @format_size = FileHelper.format_size(@size)
end

Public Instance Methods

generate_hash() click to toggle source
# File lib/fastlane/plugin/analyze_ios_ipa/helper/ipa.rb, line 32
def generate_hash
  return @result_hash if @result_hash
  @result_hash = to_hash
  @result_hash
end
generate_json() click to toggle source
# File lib/fastlane/plugin/analyze_ios_ipa/helper/ipa.rb, line 26
def generate_json
  return @result_json if @result_json
  @result_json = JSON.generate(generate_hash)
  @result_json
end
to_hash() click to toggle source
# File lib/fastlane/plugin/analyze_ios_ipa/helper/ipa.rb, line 19
def to_hash
  {
    size:        @size,
    format_size: @format_size
  }
end