mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
cleanup
This commit is contained in:
parent
ed6f3064e5
commit
11720132bb
@ -251,8 +251,8 @@ module Homebrew
|
||||
end
|
||||
|
||||
sig {
|
||||
params(names: String, description: T.nilable(String), replacement: T.any(Symbol, String, NilClass), depends_on: T.nilable(String),
|
||||
hidden: T::Boolean).void
|
||||
params(names: String, description: T.nilable(String), replacement: T.any(Symbol, String, NilClass),
|
||||
depends_on: T.nilable(String), hidden: T::Boolean).void
|
||||
}
|
||||
def flag(*names, description: nil, replacement: nil, depends_on: nil, hidden: false)
|
||||
required, flag_type = if names.any? { |name| name.end_with? "=" }
|
||||
|
@ -5,23 +5,26 @@ require "abstract_command"
|
||||
require "formulary"
|
||||
require "cask/cask_loader"
|
||||
|
||||
# @!visibility private
|
||||
class String
|
||||
# @!visibility private
|
||||
def f(*args)
|
||||
require "formula"
|
||||
Formulary.factory(self, *args)
|
||||
end
|
||||
|
||||
# @!visibility private
|
||||
def c(config: nil)
|
||||
Cask::CaskLoader.load(self, config:)
|
||||
end
|
||||
end
|
||||
|
||||
class Symbol
|
||||
# @!visibility private
|
||||
def f(*args)
|
||||
to_s.f(*args)
|
||||
end
|
||||
|
||||
# @!visibility private
|
||||
def c(config: nil)
|
||||
to_s.c(config:)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user