Sha256: 3273ed38ddbb40cbf415527a43a8b12fd53ef0d32a9df1eac3d37daf0bfd4358

Contents?: true

Size: 388 Bytes

Versions: 2

Compression:

Stored size: 388 Bytes

Contents

module Brewmaster
  class CaskCollection
    def initialize(names)
      @names = names
    end

    def install_missing
      Cask::CLI::Install.run(*missing)
    end

    # anything not installed, excluding the outdated
    def missing
      @missing ||= @names - self.class.installed
    end

    def self.installed
      Cask.installed.map {|c| (c.split("/").last)}
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
brewmaster-0.0.2 lib/brewmaster/cask_collection.rb
brewmaster-0.0.1 lib/brewmaster/cask_collection.rb