Class: APK
Constant Summary collapse
- VERSION =
'0.1.3'
Instance Attribute Summary collapse
-
#aapt ⇒ Object
readonly
Returns the value of attribute aapt.
-
#apk ⇒ Object
readonly
Returns the value of attribute apk.
-
#dump ⇒ Object
readonly
Returns the value of attribute dump.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
- #drawable(name = "icon.png") ⇒ Object
-
#initialize(apk_path) ⇒ APK
constructor
A new instance of APK.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
21 22 23 |
# File 'lib/apk.rb', line 21 def method_missing(method, *args, &block) (@dump ||= @aapt.dump)[method] end |
Instance Attribute Details
#aapt ⇒ Object (readonly)
Returns the value of attribute aapt.
7 8 9 |
# File 'lib/apk.rb', line 7 def aapt @aapt end |
#apk ⇒ Object (readonly)
Returns the value of attribute apk.
7 8 9 |
# File 'lib/apk.rb', line 7 def apk @apk end |
#dump ⇒ Object (readonly)
Returns the value of attribute dump.
7 8 9 |
# File 'lib/apk.rb', line 7 def dump @dump end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
7 8 9 |
# File 'lib/apk.rb', line 7 def resource @resource end |
Instance Method Details
#drawable(name = "icon.png") ⇒ Object
15 16 17 18 19 |
# File 'lib/apk.rb', line 15 def drawable(name = "icon.png") dst = "/tmp/ruby-apk-#{Time.now.to_i}" @resource.extract(name, dst) dst end |