Sha256: 7ab1b8559898dc6f77ecedf91e419d9c1ba51bae1b80a391c05610e622fda2dc

Contents?: true

Size: 1005 Bytes

Versions: 7

Compression:

Stored size: 1005 Bytes

Contents

require 'simctl/command'
require 'simctl/device'
require 'simctl/device_type'
require 'simctl/list'
require 'simctl/runtime'
require 'simctl/xcode/path'
require 'simctl/xcode/version'

module SimCtl
  class UnsupportedCommandError < StandardError; end
  class DeviceTypeNotFound < StandardError; end
  class RuntimeNotFound < StandardError; end
  class DeviceNotFound < 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

7 entries across 7 versions & 1 rubygems

Version Path
simctl-1.6.10 lib/simctl.rb
simctl-1.6.8 lib/simctl.rb
simctl-1.6.7 lib/simctl.rb
simctl-1.6.6 lib/simctl.rb
simctl-1.6.5 lib/simctl.rb
simctl-1.6.4 lib/simctl.rb
simctl-1.6.3 lib/simctl.rb