Class: Brewmaster::CaskCollection
- Inherits:
-
Object
- Object
- Brewmaster::CaskCollection
- Defined in:
- lib/brewmaster/cask_collection.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(names) ⇒ CaskCollection
constructor
A new instance of CaskCollection.
- #install_missing ⇒ Object
-
#missing ⇒ Object
anything not installed, excluding the outdated.
Constructor Details
#initialize(names) ⇒ CaskCollection
Returns a new instance of CaskCollection.
3 4 5 |
# File 'lib/brewmaster/cask_collection.rb', line 3 def initialize(names) @names = names end |
Class Method Details
.installed ⇒ Object
16 17 18 |
# File 'lib/brewmaster/cask_collection.rb', line 16 def self.installed Cask.installed.map {|c| (c.split("/").last)} end |
Instance Method Details
#install_missing ⇒ Object
7 8 9 |
# File 'lib/brewmaster/cask_collection.rb', line 7 def install_missing Cask::CLI::Install.run(*missing) end |
#missing ⇒ Object
anything not installed, excluding the outdated
12 13 14 |
# File 'lib/brewmaster/cask_collection.rb', line 12 def missing @missing ||= @names - self.class.installed end |