Sha256: eb348a3569725223dd27ffb6318f9848896550ea055b50b954681956f1f2380b
Contents?: true
Size: 424 Bytes
Versions: 3
Compression:
Stored size: 424 Bytes
Contents
require 'ostruct' module SimCtl class DeviceLaunchctl def initialize(device) @device = device end def list fields = [:pid, :status, :name] device .spawn(device.path.launchctl, ['list']) .split("\n") .drop(1) .map {|item| Hash[fields.zip(item.split("\t"))] } .map {|item| OpenStruct.new(item) } end private attr_reader :device end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
simctl-1.6.2 | lib/simctl/device_launchctl.rb |
simctl-1.6.1 | lib/simctl/device_launchctl.rb |
simctl-1.6.0 | lib/simctl/device_launchctl.rb |