lib/headdesk/checks/teak.rb in headdesk-0.11.1 vs lib/headdesk/checks/teak.rb in headdesk-0.11.2
- old
+ new
@@ -10,31 +10,31 @@
# Module for Teak APK checks
#
module APK
def self.included(klass)
klass.include(Check::APK)
- klass.extend(Preconditions)
- klass.include(Utility)
+ klass.extend(ClassMethods)
+ klass.include(InstanceMethods)
end
#
- # Precondition tests for presence of Teak class SDK in APK
+ # Class methods for Teak based checks
#
- module Preconditions
- def preconditions?
- false unless apk.class?('io.teak.sdk.Teak')
- end
-
+ module ClassMethods
def check_name(cname = nil)
cname = "teak/#{cname}" if cname
super(cname)
end
end
#
- # Utility methods for Teak based checks
+ # Instance methods for Teak based checks
#
- module Utility
+ module InstanceMethods
+ def preconditions?
+ false unless apk.class?('io.teak.sdk.Teak')
+ end
+
def teak_sdk
return @teak_sdk if @teak_sdk
major, minor, revision = apk.find_class('io.teak.sdk.Teak')
.field('SDKVersion')