Sha256: ad29c197b0db4f0c6e604e483df8589864c3fe5a731357071a2f2dc365af0f97

Contents?: true

Size: 502 Bytes

Versions: 1

Compression:

Stored size: 502 Bytes

Contents

require 'simctl/object'

module SimCtl
  class Runtime < Object
    attr_reader :availability, :buildversion, :identifier, :name, :version

    def ==(other)
      other.identifier == identifier
    end

    # Returns the latest available runtime
    #
    # @param name [String] type (ios, watchos, tvos)
    # @return [SimCtl::Runtime] the latest available runtime
    def self.latest(type)
      SimCtl.list_runtimes.where(name: %r|#{type}|i).sort_by {|r| r.version}.reverse.first
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simctl-1.2.3 lib/simctl/runtime.rb