Sha256: ee409590797ca57a4226033c86224e24d5f757f7d2df8669d22d655790e0fa26

Contents?: true

Size: 1.56 KB

Versions: 6

Compression:

Stored size: 1.56 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/terminate'
require 'simctl/command/list'
require 'simctl/command/openurl'
require 'simctl/command/rename'
require 'simctl/command/reset'
require 'simctl/command/shutdown'
require 'simctl/command/spawn'
require 'simctl/command/uninstall'
require 'simctl/command/warmup'
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::Terminate
    include SimCtl::Command::List
    include SimCtl::Command::OpenUrl
    include SimCtl::Command::Rename
    include SimCtl::Command::Reset
    include SimCtl::Command::Shutdown
    include SimCtl::Command::Spawn
    include SimCtl::Command::Uninstall
    include SimCtl::Command::Warmup

    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

6 entries across 6 versions & 1 rubygems

Version Path
simctl-1.6.7 lib/simctl/command.rb
simctl-1.6.6 lib/simctl/command.rb
simctl-1.6.5 lib/simctl/command.rb
simctl-1.6.4 lib/simctl/command.rb
simctl-1.6.3 lib/simctl/command.rb
simctl-1.6.2 lib/simctl/command.rb