Issy Long b7d997e80d
sorbet: Bump some files from typed: false to typed: true
- This was done with `brew typecheck --update --suggest-typed` which
  (as of the previous commit) uses Spoom, yet another gem. I thought I'd
  see how well it works. There are no Sorbet errors after these changes!
2022-10-11 01:09:03 +01:00

37 lines
691 B
Ruby

# typed: true
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `qlplugin` stanza.
#
# @api private
class Qlplugin < Moved
extend T::Sig
sig { returns(String) }
def self.english_name
"QuickLook Plugin"
end
def install_phase(**options)
super(**options)
reload_quicklook(**options)
end
def uninstall_phase(**options)
super(**options)
reload_quicklook(**options)
end
private
def reload_quicklook(command: nil, **_)
command.run!("/usr/bin/qlmanage", args: ["-r"])
end
end
end
end