Class: AppPermissionStatistics::Actuator
- Extended by:
- Forwardable
- Defined in:
- lib/app_permission_statistics.rb
Instance Attribute Summary collapse
-
#compare_file ⇒ Object
readonly
Returns the value of attribute compare_file.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#report_path ⇒ Object
readonly
Returns the value of attribute report_path.
-
#store_path ⇒ Object
readonly
Returns the value of attribute store_path.
Instance Method Summary collapse
- #analyzer ⇒ Object
- #extracter ⇒ Object
-
#initialize(file, compare_file, report_path: nil, store_path: nil) ⇒ Actuator
constructor
A new instance of Actuator.
- #run ⇒ Object
Constructor Details
#initialize(file, compare_file, report_path: nil, store_path: nil) ⇒ Actuator
Returns a new instance of Actuator.
16 17 18 19 20 21 |
# File 'lib/app_permission_statistics.rb', line 16 def initialize(file,compare_file, report_path: nil,store_path: nil) @file = file @compare_file = compare_file @report_path = report_path @store_path = store_path end |
Instance Attribute Details
#compare_file ⇒ Object (readonly)
Returns the value of attribute compare_file.
12 13 14 |
# File 'lib/app_permission_statistics.rb', line 12 def compare_file @compare_file end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
11 12 13 |
# File 'lib/app_permission_statistics.rb', line 11 def file @file end |
#report_path ⇒ Object (readonly)
Returns the value of attribute report_path.
14 15 16 |
# File 'lib/app_permission_statistics.rb', line 14 def report_path @report_path end |
#store_path ⇒ Object (readonly)
Returns the value of attribute store_path.
13 14 15 |
# File 'lib/app_permission_statistics.rb', line 13 def store_path @store_path end |
Instance Method Details
#analyzer ⇒ Object
42 43 44 45 |
# File 'lib/app_permission_statistics.rb', line 42 def analyzer identifier = @extracter.plistInfo.identifier @analyzer ||= Analyzer.new(identifier,@report_path,@store_path) end |
#extracter ⇒ Object
38 39 40 |
# File 'lib/app_permission_statistics.rb', line 38 def extracter @extracter ||= Extracter.new(@file , @store_path) end |
#run ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/app_permission_statistics.rb', line 23 def run compare_extracter = Extracter.new(@compare_file , @store_path) if compare_extracter.plistInfo.identifier != extracter.plistInfo.identifier abort("compared files have different plist identifier") end if Gem::Version.new(compare_extracter.plistInfo.version) == Gem::Version.new(extracter.plistInfo.version) abort("compared files plist version is same") end compare_extracter.extract_update extracter.extract_update analyzer.analyze([extracter.plistInfo.version,compare_extracter.plistInfo.version]) extracter.clear! compare_extracter.clear! end |