Class: Fastlane::ControlCommand
- Inherits:
-
Object
- Object
- Fastlane::ControlCommand
- Defined in:
- fastlane/lib/fastlane/server/control_command.rb
Overview
Represents a command that is meant to signal the server to do something on the client’s behalf Examples are: :cancelFastlaneRune, and :done
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#user_message ⇒ Object
readonly
Returns the value of attribute user_message.
Instance Method Summary collapse
- #cancel_signal? ⇒ Boolean
- #done_signal? ⇒ Boolean
-
#initialize(json: nil) ⇒ ControlCommand
constructor
A new instance of ControlCommand.
Constructor Details
#initialize(json: nil) ⇒ ControlCommand
Returns a new instance of ControlCommand.
9 10 11 12 13 |
# File 'fastlane/lib/fastlane/server/control_command.rb', line 9 def initialize(json: nil) @command = json['command'].to_sym @user_message = json['userMessage'] @reason = json['reason'].to_sym if json['reason'] end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
5 6 7 |
# File 'fastlane/lib/fastlane/server/control_command.rb', line 5 def command @command end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
7 8 9 |
# File 'fastlane/lib/fastlane/server/control_command.rb', line 7 def reason @reason end |
#user_message ⇒ Object (readonly)
Returns the value of attribute user_message.
6 7 8 |
# File 'fastlane/lib/fastlane/server/control_command.rb', line 6 def @user_message end |
Instance Method Details
#cancel_signal? ⇒ Boolean
15 16 17 |
# File 'fastlane/lib/fastlane/server/control_command.rb', line 15 def cancel_signal? return @command == :cancelFastlaneRun end |
#done_signal? ⇒ Boolean
19 20 21 |
# File 'fastlane/lib/fastlane/server/control_command.rb', line 19 def done_signal? return @command == :done end |