Class: Serverkit::Resources::HomebrewCask

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

Instance Attribute Summary

Attributes inherited from Base

#attributes, #backend, #recipe

Instance Method Summary collapse

Methods inherited from Base

#all_errors, attribute, #initialize, #to_a, #type

Constructor Details

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

Instance Method Details

#applyObject



8
9
10
# File 'lib/serverkit/resources/homebrew_cask.rb', line 8

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

#checktrue, false

Returns:

  • (true, false)


13
14
15
# File 'lib/serverkit/resources/homebrew_cask.rb', line 13

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