mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-15 19:56:59 +08:00
Formula.select and Formula.installed
This commit is contained in:
parent
3d657746bb
commit
b0e50ba13d
@ -304,6 +304,16 @@ class Formula
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.select
|
||||||
|
ff = []
|
||||||
|
each{ |f| ff << f if yield(f) }
|
||||||
|
ff
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.installed
|
||||||
|
HOMEBREW_CELLAR.children.map{ |rack| factory(rack.basename) rescue nil }.compact
|
||||||
|
end
|
||||||
|
|
||||||
def inspect
|
def inspect
|
||||||
name
|
name
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user