Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose devicetype/runtime identifiers #25

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions lib/simctl/device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ def delete
#
# @return [SimCtl::DeviceType]
def devicetype
@devicetype ||= SimCtl.devicetype(identifier: plist.deviceType)
@devicetype ||= SimCtl.devicetype(identifier: devicetype_identifier)
end

# Returns the device type identifier
#
# @return [String]
def devicetype_identifier
plist.deviceType
end

# Erases the device
Expand Down Expand Up @@ -150,11 +157,18 @@ def reset
SimCtl.reset_device name, devicetype, runtime
end

# Resets the runtime
# Returns the runtime
#
# @return [SimCtl::Runtime]
def runtime
@runtime ||= SimCtl.runtime(identifier: plist.runtime)
@runtime ||= SimCtl.runtime(identifier: runtime_identifier)
end

# Returns the runtime identifier
#
# @return [String]
def runtime_identifier
plist.runtime
end

# Saves a screenshot to a file
Expand Down