Simplify code style.
Co-authored-by: Kevin <apainintheneck@gmail.com>
This commit is contained in:
parent
bc6060721e
commit
825222cc83
@ -280,9 +280,7 @@ module Cask
|
|||||||
.returns(T.nilable(T.attached_class))
|
.returns(T.nilable(T.attached_class))
|
||||||
}
|
}
|
||||||
def self.try_new(ref, warn: false)
|
def self.try_new(ref, warn: false)
|
||||||
return unless ref.is_a?(Cask)
|
new(ref) if ref.is_a?(Cask)
|
||||||
|
|
||||||
new(ref)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
sig { params(cask: Cask).void }
|
sig { params(cask: Cask).void }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user