Sha256: f2ce97d22a9b16a21fdef1c2fc1a7c906ca40274c6f1a5e674c122dc4dfb7e92

Contents?: true

Size: 584 Bytes

Versions: 11

Compression:

Stored size: 584 Bytes

Contents

require 'simctl/object'

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

    def ==(other)
      return false if other.nil?
      return false unless other.kind_of? Runtime
      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

11 entries across 11 versions & 1 rubygems

Version Path
simctl-1.5.6 lib/simctl/runtime.rb
simctl-1.5.5 lib/simctl/runtime.rb
simctl-1.5.4 lib/simctl/runtime.rb
simctl-1.5.3 lib/simctl/runtime.rb
simctl-1.5.2 lib/simctl/runtime.rb
simctl-1.5.1 lib/simctl/runtime.rb
simctl-1.5.0 lib/simctl/runtime.rb
simctl-1.4.1 lib/simctl/runtime.rb
simctl-1.4.0 lib/simctl/runtime.rb
simctl-1.3.1 lib/simctl/runtime.rb
simctl-1.3.0 lib/simctl/runtime.rb