Class: XCSim::DeviceListItem
- Inherits:
-
Object
- Object
- XCSim::DeviceListItem
- Defined in:
- lib/xcsim/rbList.rb
Overview
An aggregate object containing information on a single iOS Simulator device returned by GetDeviceList#withPattern or GetDeviceList#allDevices
Instance Attribute Summary collapse
-
#bundles ⇒ Object
readonly
An array of BundleInfo objects corresponding to the applications installed on the simulator in question.
-
#device ⇒ Object
readonly
A DeviceID object corresponding to the device.
-
#os ⇒ Object
readonly
An OSDevices object corresponding to the device OS version.
Instance Method Summary collapse
-
#fullName ⇒ Object
Returns a string in
"iPhone 5s (iOS 9.2)"
format. -
#initialize(os, device, bundles) ⇒ DeviceListItem
constructor
Initializes a DeviceListItem instance with a given os, device and bundles array.
-
#inspect ⇒ Object
Same as #fullName.
-
#shortName ⇒ Object
Returns device name.
-
#to_s ⇒ Object
Same as #inspect.
Constructor Details
#initialize(os, device, bundles) ⇒ DeviceListItem
Initializes a DeviceListItem instance with a given os, device and bundles array
21 22 23 24 25 |
# File 'lib/xcsim/rbList.rb', line 21 def initialize(os, device, bundles) @os = os @device = device @bundles = bundles end |
Instance Attribute Details
#bundles ⇒ Object (readonly)
An array of BundleInfo objects corresponding to the applications installed on the simulator in question
18 19 20 |
# File 'lib/xcsim/rbList.rb', line 18 def bundles @bundles end |
#device ⇒ Object (readonly)
A DeviceID object corresponding to the device
14 15 16 |
# File 'lib/xcsim/rbList.rb', line 14 def device @device end |
#os ⇒ Object (readonly)
An OSDevices object corresponding to the device OS version
11 12 13 |
# File 'lib/xcsim/rbList.rb', line 11 def os @os end |
Instance Method Details
#fullName ⇒ Object
Returns a string in "iPhone 5s (iOS 9.2)"
format
28 29 30 |
# File 'lib/xcsim/rbList.rb', line 28 def fullName "#{device.name} (#{os.id})" end |
#inspect ⇒ Object
Same as #fullName
38 39 40 |
# File 'lib/xcsim/rbList.rb', line 38 def inspect fullName end |
#shortName ⇒ Object
Returns device name
33 34 35 |
# File 'lib/xcsim/rbList.rb', line 33 def shortName device.name end |
#to_s ⇒ Object
Same as #inspect
43 44 45 |
# File 'lib/xcsim/rbList.rb', line 43 def to_s inspect end |