Sha256: 7a458aed19d7ede6bbd30d7b447552087bcb2b37fde6c70da4939cd708939928

Contents?: true

Size: 1.35 KB

Versions: 1

Compression:

Stored size: 1.35 KB

Contents

require 'simctl/command/boot'
require 'simctl/command/create'
require 'simctl/command/delete'
require 'simctl/command/erase'
require 'simctl/command/install'
require 'simctl/command/io'
require 'simctl/command/kill'
require 'simctl/command/launch'
require 'simctl/command/list'
require 'simctl/command/openurl'
require 'simctl/command/rename'
require 'simctl/command/reset'
require 'simctl/command/shutdown'
require 'simctl/command/uninstall'
require 'simctl/executor'
require 'shellwords'

module SimCtl
  class Command
    attr_accessor :device_set_path

    include SimCtl::Command::Boot
    include SimCtl::Command::Create
    include SimCtl::Command::Delete
    include SimCtl::Command::Erase
    include SimCtl::Command::IO
    include SimCtl::Command::Install
    include SimCtl::Command::Kill
    include SimCtl::Command::Launch
    include SimCtl::Command::List
    include SimCtl::Command::OpenUrl
    include SimCtl::Command::Rename
    include SimCtl::Command::Reset
    include SimCtl::Command::Shutdown
    include SimCtl::Command::Uninstall

    def device_set_path=(device_set_path)
      @device_set_path = File.expand_path(device_set_path)
    end

    def command_for(*arguments)
      command = %w[xcrun simctl]
      command += ['--set', Shellwords.shellescape(device_set_path)] unless device_set_path.nil?
      command += arguments
      command
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simctl-1.5.8 lib/simctl/command.rb