Class: FastlaneCore::Interface
- Inherits:
-
Object
- Object
- FastlaneCore::Interface
- Defined in:
- lib/fastlane_core/ui/interface.rb
Overview
Abstract super class
Direct Known Subclasses
Messaging: show text to the user collapse
-
#command(_message) ⇒ Object
Level Command: Print out a terminal command that is being executed.
-
#command_output(_message) ⇒ Object
Level Command Output: Print the output of a command with this method.
-
#error(_message) ⇒ Object
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).
-
#header(_message) ⇒ Object
Print a header = a text in a box use this if this message is really important.
-
#important(_message) ⇒ Object
Level Important: Can be used to show warnings to the user not necessarly negative, but something the user should be aware of.
-
#message(_message) ⇒ Object
Level Message: Show a neutral message to the user.
-
#success(_message) ⇒ Object
Level Success: Show that something was successful.
-
#verbose(_message) ⇒ Object
Level Verbose: Print out additional information for the users that are interested.
Errors: Inputs collapse
-
#confirm(_message) ⇒ Object
A simple yes or no question.
-
#input(_message) ⇒ Object
get a standard text input (single line).
-
#interactive?(_message) ⇒ Boolean
Is is possible to ask the user questions?.
-
#password(_message) ⇒ Object
Password input for the user, text field shouldn’t show plain text.
-
#select(_message, _options) ⇒ Object
Let the user select one out of x items return value is the value of the option the user chose.
Errors: Different kinds of exceptions collapse
-
#crash!(_exception) ⇒ Object
Pass an exception to this method to exit the program using the given exception.
-
#user_error!(_error_message) ⇒ Object
Use this method to exit the program because of an user error e.g.
Helpers collapse
Instance Method Details
#command(_message) ⇒ Object
Level Command: Print out a terminal command that is being
executed.
By default those shown in cyan
45 46 47 |
# File 'lib/fastlane_core/ui/interface.rb', line 45 def command() not_implemented(__method__) end |
#command_output(_message) ⇒ Object
Level Command Output: Print the output of a command with
this method
By default those shown in magenta
53 54 55 |
# File 'lib/fastlane_core/ui/interface.rb', line 53 def command_output() not_implemented(__method__) end |
#confirm(_message) ⇒ Object
A simple yes or no question
87 88 89 |
# File 'lib/fastlane_core/ui/interface.rb', line 87 def confirm() not_implemented(__method__) end |
#crash!(_exception) ⇒ Object
Pass an exception to this method to exit the program
using the given exception
109 110 111 |
# File 'lib/fastlane_core/ui/interface.rb', line 109 def crash!(_exception) not_implemented(__method__) end |
#error(_message) ⇒ Object
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 are shown in red
14 15 16 |
# File 'lib/fastlane_core/ui/interface.rb', line 14 def error() not_implemented(__method__) end |
#header(_message) ⇒ Object
Print a header = a text in a box
use this if this is really important
68 69 70 |
# File 'lib/fastlane_core/ui/interface.rb', line 68 def header() not_implemented(__method__) end |
#important(_message) ⇒ Object
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 are shown in yellow
23 24 25 |
# File 'lib/fastlane_core/ui/interface.rb', line 23 def important() not_implemented(__method__) end |
#input(_message) ⇒ Object
get a standard text input (single line)
82 83 84 |
# File 'lib/fastlane_core/ui/interface.rb', line 82 def input() not_implemented(__method__) end |
#interactive?(_message) ⇒ Boolean
Is is possible to ask the user questions?
77 78 79 |
# File 'lib/fastlane_core/ui/interface.rb', line 77 def interactive?() not_implemented(__method__) end |
#message(_message) ⇒ Object
Level Message: Show a neutral message to the user
By default those shown in white/black
37 38 39 |
# File 'lib/fastlane_core/ui/interface.rb', line 37 def () not_implemented(__method__) end |
#not_implemented(method_name) ⇒ Object
125 126 127 |
# File 'lib/fastlane_core/ui/interface.rb', line 125 def not_implemented(method_name) raise "Current UI '#{self}' doesn't support method '#{method_name}'".red end |
#password(_message) ⇒ Object
Password input for the user, text field shouldn’t show plain text
99 100 101 |
# File 'lib/fastlane_core/ui/interface.rb', line 99 def password() not_implemented(__method__) end |
#select(_message, _options) ⇒ Object
Let the user select one out of x items return value is the value of the option the user chose
93 94 95 |
# File 'lib/fastlane_core/ui/interface.rb', line 93 def select(, ) not_implemented(__method__) end |
#success(_message) ⇒ Object
Level Success: Show that something was successful
By default those are shown in green
30 31 32 |
# File 'lib/fastlane_core/ui/interface.rb', line 30 def success() not_implemented(__method__) end |
#to_s ⇒ Object
129 130 131 |
# File 'lib/fastlane_core/ui/interface.rb', line 129 def to_s self.class.name.split('::').last end |
#user_error!(_error_message) ⇒ Object
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
This will show the error message, but doesn’t show the full
stack trace
118 119 120 |
# File 'lib/fastlane_core/ui/interface.rb', line 118 def user_error!() not_implemented(__method__) end |
#verbose(_message) ⇒ Object
Level Verbose: Print out additional information for the
users that are interested. Will only be printed when
$verbose = true
By default those are shown in white
62 63 64 |
# File 'lib/fastlane_core/ui/interface.rb', line 62 def verbose() not_implemented(__method__) end |