Class: Serverkit::Resources::HomebrewCask

Inherits:
Base
  • Object
show all
Defined in:
lib/serverkit/resources/homebrew_cask.rb

Instance Attribute Summary

Attributes inherited from Base

#backend

Instance Method Summary collapse

Methods inherited from Base

#initialize, #name

Constructor Details

This class inherits a constructor from Serverkit::Resources::Base

Instance Method Details

#apply ⇒ Object



6
7
8
# File 'lib/serverkit/resources/homebrew_cask.rb', line 6

def apply
  run_command("brew cask install #{package}")
end

#check ⇒ true, false

Returns:

  • (true, false)


11
12
13
# File 'lib/serverkit/resources/homebrew_cask.rb', line 11

def check
  check_command("/usr/local/bin/brew cask list -1 | grep -E '^#{package}$'")
end