Class: Fastlane::ControlCommand

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#commandObject (readonly)

Returns the value of attribute command.



5
6
7
# File 'fastlane/lib/fastlane/server/control_command.rb', line 5

def command
  @command
end

#reasonObject (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_messageObject (readonly)

Returns the value of attribute user_message.



6
7
8
# File 'fastlane/lib/fastlane/server/control_command.rb', line 6

def user_message
  @user_message
end

Instance Method Details

#cancel_signal?Boolean

Returns:



15
16
17
# File 'fastlane/lib/fastlane/server/control_command.rb', line 15

def cancel_signal?
  return @command == :cancelFastlaneRun
end

#done_signal?Boolean

Returns:



19
20
21
# File 'fastlane/lib/fastlane/server/control_command.rb', line 19

def done_signal?
  return @command == :done
end