Sha256: e59fb1c9aa321d766537ac11283bb0d3d2ee8a6951a92b8fc126402ebe31a3a5

Contents?: true

Size: 478 Bytes

Versions: 29

Compression:

Stored size: 478 Bytes

Contents

require 'commander'

module FastlaneCore
  class CommanderGenerator
    include Commander::Methods

    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
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
fastlane_core-0.4.3.pre lib/fastlane_core/configuration/commander_generator.rb
fastlane_core-0.4.2 lib/fastlane_core/configuration/commander_generator.rb
fastlane_core-0.4.1 lib/fastlane_core/configuration/commander_generator.rb
fastlane_core-0.4.0 lib/fastlane_core/configuration/commander_generator.rb
fastlane_core-0.3.4 lib/fastlane_core/configuration/commander_generator.rb
fastlane_core-0.3.3 lib/fastlane_core/configuration/commander_generator.rb
fastlane_core-0.3.2 lib/fastlane_core/configuration/commander_generator.rb
fastlane_core-0.3.1 lib/fastlane_core/configuration/commander_generator.rb
fastlane_core-0.3.0 lib/fastlane_core/configuration/commander_generator.rb