Class: Flappy::Parser::Apk
- Includes:
- Common
- Defined in:
- lib/flappy/util/parser/apk.rb
Instance Method Summary collapse
- #basic_info ⇒ Object
- #full_info(options) ⇒ Object
-
#initialize(path) ⇒ Apk
constructor
A new instance of Apk.
- #tmp_icons ⇒ Object
Methods included from Common
Constructor Details
#initialize(path) ⇒ Apk
Returns a new instance of Apk.
10 11 12 |
# File 'lib/flappy/util/parser/apk.rb', line 10 def initialize(path) @apk = ::Android::Apk.new(path) end |
Instance Method Details
#basic_info ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/flappy/util/parser/apk.rb', line 22 def basic_info @basic_info ||= { type: 'android', identifier: @apk.manifest.package_name, name: @apk.label, build: @apk.manifest.version_code.to_s, version: @apk.manifest.version_name.to_s } end |
#full_info(options) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/flappy/util/parser/apk.rb', line 14 def full_info() if .fetch(:full_info, false) basic_info.merge!(icons: tmp_icons) end basic_info end |
#tmp_icons ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/flappy/util/parser/apk.rb', line 33 def tmp_icons begin @apk.icon.map { |_, data| generate_tmp_icon(data, :apk) } rescue [] end end |