Skip to content
Snippets Groups Projects
Commit 1ea50d08 authored by Markus Reiter's avatar Markus Reiter
Browse files

Document `Dependency` and `TapDependency`.

parent 8f468d0c
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@
require "dependable"
# A dependency on another Homebrew formula.
#
# @api private
class Dependency
extend Forwardable
include Dependable
......@@ -10,6 +12,7 @@ class Dependency
attr_reader :name, :tags, :env_proc, :option_names
DEFAULT_ENV_PROC = proc {}.freeze
private_constant :DEFAULT_ENV_PROC
def initialize(name, tags = [], env_proc = DEFAULT_ENV_PROC, option_names = [name])
raise ArgumentError, "Dependency must have a name!" unless name
......@@ -176,6 +179,7 @@ class Dependency
end
end
# A dependency on another Homebrew formula in a specific tap.
class TapDependency < Dependency
attr_reader :tap
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment