Class: Fastlane::Actions::SayAction
Constant Summary
Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES
Class Method Summary
collapse
action_name, authors, deprecated_notes, details, lane_context, method_missing, other_action, output, return_type, return_value, sample_return_value, shell_out_should_use_bundle_exec?, step_text
Class Method Details
.author ⇒ Object
40
41
42
|
# File 'fastlane/lib/fastlane/actions/say.rb', line 40
def self.author
"KrauseFx"
end
|
.available_options ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'fastlane/lib/fastlane/actions/say.rb', line 21
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :text,
description: 'Text to be spoken out loud (as string or array of strings)',
optional: false,
type: Array),
FastlaneCore::ConfigItem.new(key: :mute,
env_name: "SAY_MUTE",
description: 'If say should be muted with text printed out',
optional: false,
type: Boolean,
default_value: false)
]
end
|
.category ⇒ Object
50
51
52
|
# File 'fastlane/lib/fastlane/actions/say.rb', line 50
def self.category
:misc
end
|
.description ⇒ Object
17
18
19
|
# File 'fastlane/lib/fastlane/actions/say.rb', line 17
def self.description
"This action speaks the given text out loud"
end
|
.example_code ⇒ Object
44
45
46
47
48
|
# File 'fastlane/lib/fastlane/actions/say.rb', line 44
def self.example_code
[
'say("I can speak")'
]
end
|
.is_supported?(platform) ⇒ Boolean
36
37
38
|
# File 'fastlane/lib/fastlane/actions/say.rb', line 36
def self.is_supported?(platform)
true
end
|
.run(params) ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'fastlane/lib/fastlane/actions/say.rb', line 4
def self.run(params)
text = params[:text]
text = text.join(' ')
text = text.tr("'", '"')
if params[:mute]
UI.message(text)
return text
else
Actions.sh("say '#{text}'")
end
end
|