Class: AppRepo::DetectValues

Inherits:
Object
  • Object
show all
Defined in:
lib/apprepo/detect_values.rb

Overview

This class is responsible for detecting values from IPA.

Instance Method Summary collapse

Instance Method Details

#find_app_identifier(options) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/apprepo/detect_values.rb', line 9

def find_app_identifier(options)
  return if options[:app_identifier]
  if options[:ipa]
    # identifier = AppRepo::Analyser.fetch_app_identifier(options[:ipa])
  end
  options[:app_identifier] = identifier unless identifier.to_s.empty?
  input_message = 'The Bundle Identifier of your App: '
  options[:app_identifier] ||= UI.input(input_message)
end

#find_version(options) ⇒ Object



19
20
21
22
23
24
# File 'lib/apprepo/detect_values.rb', line 19

def find_version(options)
  unless options[:ipa].nil?
    opt = AppRepo::Analyser.new(options)
    options[:app_version] ||= opt.fetch_app_version(options[:ipa])
  end
end

#run!(options) ⇒ Object



4
5
6
7
# File 'lib/apprepo/detect_values.rb', line 4

def run!(options)
  find_app_identifier(options)
  find_version(options)
end