formula: require instances to use a subclass
This commit is contained in:
parent
93647e5c98
commit
1c5ba1f685
@ -181,6 +181,9 @@ class Formula
|
||||
|
||||
# @private
|
||||
def initialize(name, path, spec, alias_path: nil, force_bottle: false)
|
||||
# Only allow instances of subclasses. The base class does not hold any spec information (URLs etc).
|
||||
raise "Do not call `Formula.new' directly without a subclass." unless self.class < Formula
|
||||
|
||||
@name = name
|
||||
@path = path
|
||||
@alias_path = alias_path
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user