class FastlaneCore::Interface

Abstract super class

Public Instance Methods

command(_message) click to toggle source

Level Command: Print out a terminal command that is being

executed.

By default those messages shown in cyan
# File lib/fastlane_core/ui/interface.rb, line 52
def command(_message)
  not_implemented(__method__)
end
command_output(_message) click to toggle source

Level Command Output: Print the output of a command with

this method

By default those messages shown in magenta
# File lib/fastlane_core/ui/interface.rb, line 60
def command_output(_message)
  not_implemented(__method__)
end
confirm(_message) click to toggle source

A simple yes or no question

# File lib/fastlane_core/ui/interface.rb, line 94
def confirm(_message)
  not_implemented(__method__)
end
crash!(exception) click to toggle source

Pass an exception to this method to exit the program

using the given exception

Use this method instead of user_error! if this error is unexpected, e.g. an invalid server response that shouldn't happen

# File lib/fastlane_core/ui/interface.rb, line 131
def crash!(exception)
  raise FastlaneCrash.new, exception.to_s
end
deprecated(_message) click to toggle source

Level Deprecated: Show that a particular function is deprecated

By default those messages shown in strong blue
# File lib/fastlane_core/ui/interface.rb, line 44
def deprecated(_message)
  not_implemented(__method__)
end
error(_message) click to toggle source

Level Error: Can be used to show additional error

information before actually raising an exception
or can be used to just show an error from which
fastlane can recover (much magic)

By default those messages are shown in red
# File lib/fastlane_core/ui/interface.rb, line 14
def error(_message)
  not_implemented(__method__)
end
header(_message) click to toggle source

Print a header = a text in a box

use this if this message is really important
# File lib/fastlane_core/ui/interface.rb, line 75
def header(_message)
  not_implemented(__method__)
end
important(_message) click to toggle source

Level Important: Can be used to show warnings to the user

not necessarly negative, but something the user should
be aware of.

By default those messages are shown in yellow
# File lib/fastlane_core/ui/interface.rb, line 23
def important(_message)
  not_implemented(__method__)
end
input(_message) click to toggle source

get a standard text input (single line)

# File lib/fastlane_core/ui/interface.rb, line 89
def input(_message)
  not_implemented(__method__)
end
interactive?(_message) click to toggle source

Is is possible to ask the user questions?

# File lib/fastlane_core/ui/interface.rb, line 84
def interactive?(_message)
  not_implemented(__method__)
end
message(_message) click to toggle source

Level Message: Show a neutral message to the user

By default those messages shown in white/black
# File lib/fastlane_core/ui/interface.rb, line 37
def message(_message)
  not_implemented(__method__)
end
not_implemented(method_name) click to toggle source

@!group Helpers

# File lib/fastlane_core/ui/interface.rb, line 151
def not_implemented(method_name)
  UI.user_error!("Current UI '#{self}' doesn't support method '#{method_name}'")
end
password(_message) click to toggle source

Password input for the user, text field shouldn't show plain text

# File lib/fastlane_core/ui/interface.rb, line 106
def password(_message)
  not_implemented(__method__)
end
select(_message, _options) click to toggle source

Let the user select one out of x items return value is the value of the option the user chose

# File lib/fastlane_core/ui/interface.rb, line 100
def select(_message, _options)
  not_implemented(__method__)
end
success(_message) click to toggle source

Level Success: Show that something was successful

By default those messages are shown in green
# File lib/fastlane_core/ui/interface.rb, line 30
def success(_message)
  not_implemented(__method__)
end
to_s() click to toggle source
# File lib/fastlane_core/ui/interface.rb, line 155
def to_s
  self.class.name.split('::').last
end
user_error!(error_message, options = {}) click to toggle source

Use this method to exit the program because of an user error

e.g. app doesn't exist on the given Developer Account
     or invalid user credentials
     or scan tests fail

This will show the error message, but doesn't show the full

stack trace

Basically this should be used when you actively catch the error and want to show a nice error message to the user

# File lib/fastlane_core/ui/interface.rb, line 143
def user_error!(error_message, options = {})
  options = { show_github_issues: false }.merge(options)
  raise FastlaneError.new(show_github_issues: options[:show_github_issues]), error_message.to_s
end
verbose(_message) click to toggle source

Level Verbose: Print out additional information for the

users that are interested. Will only be printed when
$verbose = true

By default those messages are shown in white
# File lib/fastlane_core/ui/interface.rb, line 69
def verbose(_message)
  not_implemented(__method__)
end