Class: Headdesk::APKDescriber
- Inherits:
-
Object
- Object
- Headdesk::APKDescriber
- Defined in:
- lib/headdesk/descriptionator.rb
Overview
Descriptions for APK methods
:reek:RepeatedConditional
Instance Method Summary collapse
- #class?(decl) ⇒ Boolean
-
#initialize(mode) ⇒ APKDescriber
constructor
A new instance of APKDescriber.
- #min_sdk(gt_eq) ⇒ Object
- #resources ⇒ Object
- #targets_sdk(gt_eq) ⇒ Object
Constructor Details
#initialize(mode) ⇒ APKDescriber
Returns a new instance of APKDescriber.
11 12 13 |
# File 'lib/headdesk/descriptionator.rb', line 11 def initialize(mode) @unless = (mode == :unless) end |
Instance Method Details
#class?(decl) ⇒ Boolean
15 16 17 |
# File 'lib/headdesk/descriptionator.rb', line 15 def class?(decl) "APK #{@unless ? 'contains' : 'does not contain'} class #{decl.tr('/', '.')}" end |
#min_sdk(gt_eq) ⇒ Object
23 24 25 |
# File 'lib/headdesk/descriptionator.rb', line 23 def min_sdk(gt_eq) "APK requires #{@unless ? 'at least' : 'less than'} API #{gt_eq}" end |
#resources ⇒ Object
27 28 29 |
# File 'lib/headdesk/descriptionator.rb', line 27 def resources @resources ||= APKResourcesDescriber.new(@unless) end |
#targets_sdk(gt_eq) ⇒ Object
19 20 21 |
# File 'lib/headdesk/descriptionator.rb', line 19 def targets_sdk(gt_eq) "APK targets API #{@unless ? '>=' : '<'} #{gt_eq}" end |