Class: Bwoken::Device
- Inherits:
-
Object
- Object
- Bwoken::Device
- Defined in:
- lib/bwoken/device.rb
Class Method Summary collapse
Class Method Details
.connected? ⇒ Boolean
13 14 15 |
# File 'lib/bwoken/device.rb', line 13 def connected? self.uuid ? true : false end |
.should_use_simulator? ⇒ Boolean
5 6 7 |
# File 'lib/bwoken/device.rb', line 5 def should_use_simulator? want_simulator? || ! connected? end |
.uuid ⇒ Object
17 18 19 20 |
# File 'lib/bwoken/device.rb', line 17 def uuid ioreg = `ioreg -w 0 -rc IOUSBDevice -k SupportsIPhoneOS` ioreg[/"USB Serial Number" = "([0-9a-z]+)"/] && $1 end |
.want_simulator? ⇒ Boolean
9 10 11 |
# File 'lib/bwoken/device.rb', line 9 def want_simulator? ENV['SIMULATOR'] && ENV['SIMULATOR'].downcase == 'true' end |