mirror of
https://github.com/gosticks/brew.git
synced 2026-10-06 23:46:56 +00:00
Document Formulary.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user