Class: Fastlane::Helper::SyncDevicesHelper::Command::Rename
- Defined in:
- lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/command.rb
Overview
Command to rename an existing device.
Instance Attribute Summary collapse
- #name ⇒ String readonly
Attributes inherited from Base
Instance Method Summary collapse
- #description ⇒ String
-
#initialize(device, name) ⇒ Rename
constructor
A new instance of Rename.
- #run ⇒ void
Constructor Details
#initialize(device, name) ⇒ Rename
Returns a new instance of Rename.
82 83 84 85 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/command.rb', line 82 def initialize(device, name) super(device) @name = name end |
Instance Attribute Details
#name ⇒ String (readonly)
78 79 80 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/command.rb', line 78 def name @name end |
Instance Method Details
#description ⇒ String
93 94 95 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/command.rb', line 93 def description "Renamed #{device.name} to #{name} (#{device.udid})" end |
#run ⇒ void
This method returns an undefined value.
88 89 90 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/command.rb', line 88 def run Spaceship::ConnectAPI::Device.rename(device.udid, name) end |