Class: Fastlane::ActionCommand
- Inherits:
-
Object
- Object
- Fastlane::ActionCommand
- Defined in:
- fastlane/lib/fastlane/server/action_command.rb
Overview
Represents a command that is meant to execute an Action on the client’s behalf
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
always present.
-
#class_name ⇒ Object
readonly
only present when executing a class-method.
-
#command_id ⇒ Object
readonly
always present.
-
#method_name ⇒ Object
readonly
always present.
Instance Method Summary collapse
- #cancel_signal? ⇒ Boolean
-
#initialize(json: nil) ⇒ ActionCommand
constructor
A new instance of ActionCommand.
- #is_class_method_command ⇒ Object
- #target_class ⇒ Object
Constructor Details
#initialize(json: nil) ⇒ ActionCommand
Returns a new instance of ActionCommand.
34 35 36 37 38 39 40 41 42 43 |
# File 'fastlane/lib/fastlane/server/action_command.rb', line 34 def initialize(json: nil) @method_name = json['methodName'] @class_name = json['className'] @command_id = json['commandID'] args_json = json['args'] ||= [] @args = args_json.map do |arg| Argument.new(json: arg) end end |
Instance Attribute Details
#args ⇒ Object (readonly)
always present
30 31 32 |
# File 'fastlane/lib/fastlane/server/action_command.rb', line 30 def args @args end |
#class_name ⇒ Object (readonly)
only present when executing a class-method
32 33 34 |
# File 'fastlane/lib/fastlane/server/action_command.rb', line 32 def class_name @class_name end |
#command_id ⇒ Object (readonly)
always present
29 30 31 |
# File 'fastlane/lib/fastlane/server/action_command.rb', line 29 def command_id @command_id end |
#method_name ⇒ Object (readonly)
always present
31 32 33 |
# File 'fastlane/lib/fastlane/server/action_command.rb', line 31 def method_name @method_name end |
Instance Method Details
#cancel_signal? ⇒ Boolean
45 46 47 |
# File 'fastlane/lib/fastlane/server/action_command.rb', line 45 def cancel_signal? return @command_id == "cancelFastlaneRun" end |
#is_class_method_command ⇒ Object
57 58 59 |
# File 'fastlane/lib/fastlane/server/action_command.rb', line 57 def is_class_method_command return class_name.to_s.length > 0 end |