Douglas Eichelberger 24cf6076e8 brew style --fix
2023-04-24 20:42:39 -07:00

35 lines
670 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
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