Class: Headdesk::APKReport

Inherits:
Report
  • Object
show all
Defined in:
lib/headdesk/report.rb

Overview

Report from an APK analysis

Instance Attribute Summary

Attributes inherited from Report

#android_sdk, #apk, #bundle_id, #checks, #file_name, #ipa

Instance Method Summary collapse

Methods inherited from Report

#<<, #color_for_status, #icon_for_status, #link, #to_json, #to_s

Constructor Details

#initialize(apk) ⇒ APKReport

Returns a new instance of APKReport.



74
75
76
77
78
79
# File 'lib/headdesk/report.rb', line 74

def initialize(apk)
  super()
  @bundle_id = apk.android_manifest.attributes['package']
  @file_name = apk.yaml['apkFileName']
  @android_sdk = apk.sdk_info
end

Instance Method Details

#describeObject



81
82
83
84
85
86
# File 'lib/headdesk/report.rb', line 81

def describe
  "    minSdkVersion: \#{@android_sdk['minSdkVersion']}\n    targetSdkVersion: \#{@android_sdk['targetSdkVersion']}\n  DESCRIPTION\nend\n"

#to_hObject



88
89
90
91
92
93
# File 'lib/headdesk/report.rb', line 88

def to_h
  super.merge(
    apk: true,
    android_sdk: @android_sdk
  )
end