Sha256: 75956b8946ad7fc016d19043060b8caa2e003cde8ada6c929ba9bf4ae68df2ce

Contents?: true

Size: 931 Bytes

Versions: 1

Compression:

Stored size: 931 Bytes

Contents

require 'simctl/command'
require 'simctl/device'
require 'simctl/device_type'
require 'simctl/list'
require 'simctl/runtime'
require 'simctl/xcode_version'

module SimCtl
  class UnsupportedCommandError < StandardError; end
  class DeviceTypeNotFound < StandardError; end
  class RuntimeNotFound < StandardError; end

  @@default_timeout = 15

  class << self
    def default_timeout
      @@default_timeout
    end

    def default_timeout=(timeout)
      @@default_timeout = timeout
    end

    def command
      return @command if defined?(@command)
      @command = SimCtl::Command.new
    end

    private

    def respond_to_missing?(method_name, include_private=false)
      command.respond_to?(method_name, include_private)
    end

    def method_missing(method_name, *args, &block)
      if command.respond_to?(method_name)
        return command.send(method_name, *args, &block)
      end
      super
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simctl-1.5.8 lib/simctl.rb