Formula: move pin methods somewhere less intrusive
This commit is contained in:
parent
6e3cb9f735
commit
0e81c4de9c
@ -98,22 +98,6 @@ class Formula
|
|||||||
(dir = installed_prefix).directory? && dir.children.length > 0
|
(dir = installed_prefix).directory? && dir.children.length > 0
|
||||||
end
|
end
|
||||||
|
|
||||||
def pinnable?
|
|
||||||
@pin.pinnable?
|
|
||||||
end
|
|
||||||
|
|
||||||
def pinned?
|
|
||||||
@pin.pinned?
|
|
||||||
end
|
|
||||||
|
|
||||||
def pin
|
|
||||||
@pin.pin
|
|
||||||
end
|
|
||||||
|
|
||||||
def unpin
|
|
||||||
@pin.unpin
|
|
||||||
end
|
|
||||||
|
|
||||||
def linked_keg
|
def linked_keg
|
||||||
Pathname.new("#{HOMEBREW_LIBRARY}/LinkedKegs/#{name}")
|
Pathname.new("#{HOMEBREW_LIBRARY}/LinkedKegs/#{name}")
|
||||||
end
|
end
|
||||||
@ -281,6 +265,22 @@ class Formula
|
|||||||
@lock.unlock unless @lock.nil?
|
@lock.unlock unless @lock.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def pinnable?
|
||||||
|
@pin.pinnable?
|
||||||
|
end
|
||||||
|
|
||||||
|
def pinned?
|
||||||
|
@pin.pinned?
|
||||||
|
end
|
||||||
|
|
||||||
|
def pin
|
||||||
|
@pin.pin
|
||||||
|
end
|
||||||
|
|
||||||
|
def unpin
|
||||||
|
@pin.unpin
|
||||||
|
end
|
||||||
|
|
||||||
def == b
|
def == b
|
||||||
name == b.name
|
name == b.name
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user