Class: FastlaneCore::CommanderGenerator

Inherits:
Object
  • Object
show all
Includes:
Commander::Methods
Defined in:
lib/fastlane_core/configuration/commander_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate(options) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/fastlane_core/configuration/commander_generator.rb', line 7

def generate(options)
  options.each do |option|
    appendix = (option.is_string ? "STRING" : "")
    type = (option.is_string ? String : nil)
    short_option = option.short_option || "-#{option.key.to_s[0]}"
    global_option short_option, "--#{option.key} #{appendix}", type, (option.description + " (#{option.env_name})")
  end
end