Document Formulary.

This commit is contained in:
Markus Reiter
2020-08-26 03:13:58 +02:00
parent 3851087d01
commit fc6037ce53
+5 -2
View File
@@ -6,7 +6,8 @@ require "tab"
# The Formulary is responsible for creating instances of {Formula}.
# It is not meant to be used directly from formulae.
#
# @api private
module Formulary
extend Cachable
@@ -150,7 +151,7 @@ module Formulary
end
end
# Loads formulae from bottles.
# Loads a formula from a bottle.
class BottleLoader < FormulaLoader
def initialize(bottle_name)
case bottle_name
@@ -187,6 +188,7 @@ module Formulary
end
end
# Loads a formula from a path to an alias.
class AliasLoader < FormulaLoader
def initialize(alias_path)
path = alias_path.resolved_path
@@ -298,6 +300,7 @@ module Formulary
end
end
# Pseudo-loader which will raise a `FormulaUnavailableError` when trying to load the corresponding formula.
class NullLoader < FormulaLoader
def initialize(name)
super name, Formulary.core_path(name)