class FBSC

Class to handle fbsimctl shell commands

Public Class Methods

boot(device) click to toggle source
# File lib/fbsimctl-extension/fbsimctl.rb, line 5
def boot(device)
  execute_command("#{fbsimctl_command} '#{device}' boot")
end
h()
Alias for: help
help() click to toggle source
# File lib/fbsimctl-extension/fbsimctl.rb, line 17
def help
  public_methods(false)
end
Also aliased as: h
install(path) click to toggle source
# File lib/fbsimctl-extension/fbsimctl.rb, line 9
def install(path)
  execute_command("#{fbsimctl_command} install '#{path}'")
end
uninstall(app) click to toggle source
# File lib/fbsimctl-extension/fbsimctl.rb, line 13
def uninstall(app)
  execute_command("#{fbsimctl_command} uninstall '#{app}'")
end

Protected Class Methods

method_missing(method, *_args, &_block) click to toggle source
# File lib/fbsimctl-extension/fbsimctl.rb, line 35
def method_missing(method, *_args, &_block)
  execute_command("#{fbsimctl_command} #{method}")
end

Private Class Methods

execute_command(command) click to toggle source
# File lib/fbsimctl-extension/fbsimctl.rb, line 24
def execute_command(command)
  stdout, _stderr, status = Open3.capture3(command)
  status.success? ? nil : raise(stdout)
end
fbsimctl_command() click to toggle source
# File lib/fbsimctl-extension/fbsimctl.rb, line 29
def fbsimctl_command
  'fbsimctl'
end