Class: TapConfig Private
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Permanent configuration per Tap using git-config(1)
.
Instance Attribute Summary collapse
- #tap ⇒ Tap readonly private
Instance Method Summary collapse
- #[](key) ⇒ Boolean? private
- #[]=(key, value) ⇒ void private
- #delete(key) ⇒ void private
- #initialize(tap) ⇒ void constructor private
Constructor Details
#initialize(tap) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
1518 1519 1520 |
# File 'tap.rb', line 1518 def initialize(tap) @tap = tap end |
Instance Attribute Details
#tap ⇒ Tap (readonly)
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
1515 1516 1517 |
# File 'tap.rb', line 1515 def tap @tap end |
Instance Method Details
#[](key) ⇒ Boolean?
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
1523 1524 1525 1526 1527 1528 1529 1530 1531 |
# File 'tap.rb', line 1523 def [](key) return unless tap.git? return unless Utils::Git.available? case Homebrew::Settings.read(key, repo: tap.path) when "true" then true when "false" then false end end |
#[]=(key, value) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
1534 1535 1536 1537 1538 1539 |
# File 'tap.rb', line 1534 def []=(key, value) return unless tap.git? return unless Utils::Git.available? Homebrew::Settings.write key, value.to_s, repo: tap.path end |
#delete(key) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
1542 1543 1544 1545 1546 1547 |
# File 'tap.rb', line 1542 def delete(key) return unless tap.git? return unless Utils::Git.available? Homebrew::Settings.delete key, repo: tap.path end |