Class: Fastlane::Helper::SyncDevicesHelper::Command::Rename

Inherits:
Base
  • Object
show all
Defined in:
lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/command.rb

Overview

Command to rename an existing device.

Instance Attribute Summary collapse

Attributes inherited from Base

#device

Instance Method Summary collapse

Constructor Details

#initialize(device, name) ⇒ Rename

Returns a new instance of Rename.

Parameters:

  • device (Spaceship::ConnectAPI::Device)
  • name (String)


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

#nameString (readonly)

Returns:

  • (String)


78
79
80
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/command.rb', line 78

def name
  @name
end

Instance Method Details

#descriptionString

Returns:

  • (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

#runvoid

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