Document Formulary
.
This commit is contained in:
parent
3851087d01
commit
fc6037ce53
@ -6,7 +6,8 @@ require "tab"
|
|||||||
|
|
||||||
# The Formulary is responsible for creating instances of {Formula}.
|
# The Formulary is responsible for creating instances of {Formula}.
|
||||||
# It is not meant to be used directly from formulae.
|
# It is not meant to be used directly from formulae.
|
||||||
|
#
|
||||||
|
# @api private
|
||||||
module Formulary
|
module Formulary
|
||||||
extend Cachable
|
extend Cachable
|
||||||
|
|
||||||
@ -150,7 +151,7 @@ module Formulary
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Loads formulae from bottles.
|
# Loads a formula from a bottle.
|
||||||
class BottleLoader < FormulaLoader
|
class BottleLoader < FormulaLoader
|
||||||
def initialize(bottle_name)
|
def initialize(bottle_name)
|
||||||
case bottle_name
|
case bottle_name
|
||||||
@ -187,6 +188,7 @@ module Formulary
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Loads a formula from a path to an alias.
|
||||||
class AliasLoader < FormulaLoader
|
class AliasLoader < FormulaLoader
|
||||||
def initialize(alias_path)
|
def initialize(alias_path)
|
||||||
path = alias_path.resolved_path
|
path = alias_path.resolved_path
|
||||||
@ -298,6 +300,7 @@ module Formulary
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Pseudo-loader which will raise a `FormulaUnavailableError` when trying to load the corresponding formula.
|
||||||
class NullLoader < FormulaLoader
|
class NullLoader < FormulaLoader
|
||||||
def initialize(name)
|
def initialize(name)
|
||||||
super name, Formulary.core_path(name)
|
super name, Formulary.core_path(name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user