Class: Fastlane::Helper::SyncDevicesHelper::Command::EnableAndRename
- Inherits:
-
Base
- Object
- Struct
- Base
- Fastlane::Helper::SyncDevicesHelper::Command::EnableAndRename
- Defined in:
- lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/command.rb
Overview
Command to enable and rename an existing device.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
Name.
Attributes inherited from Base
Instance Method Summary collapse
- #description ⇒ String
-
#initialize(device, name) ⇒ EnableAndRename
constructor
A new instance of EnableAndRename.
- #run ⇒ void
Constructor Details
#initialize(device, name) ⇒ EnableAndRename
Returns a new instance of EnableAndRename.
134 135 136 137 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/command.rb', line 134 def initialize(device, name) super(device) @name = name end |
Instance Attribute Details
#name ⇒ String (readonly)
Returns name.
130 131 132 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/command.rb', line 130 def name @name end |
Instance Method Details
#description ⇒ String
149 150 151 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/command.rb', line 149 def description "Enabled and renamed #{device.name} to #{name} (#{device.udid})" end |
#run ⇒ void
This method returns an undefined value.
140 141 142 143 144 145 146 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/command.rb', line 140 def run Spaceship::ConnectAPI::Device.modify( device.udid, enabled: true, new_name: name ) end |