aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/update-report.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-06-26 07:30:28 +0200
committerMarkus Reiter2017-06-28 09:25:31 +0200
commit3b4ee58c491f164c2751c1c0f941568c35fb0ac6 (patch)
treeeb6690a2d0e872c3f7e317d5aeadb0eb03697195 /Library/Homebrew/cmd/update-report.rb
parent4fb60d89886758884fae29566fc04de66837f0c6 (diff)
downloadbrew-3b4ee58c491f164c2751c1c0f941568c35fb0ac6.tar.bz2
Refactor using `Forwardable` and `DelegateClass`.
Diffstat (limited to 'Library/Homebrew/cmd/update-report.rb')
-rw-r--r--Library/Homebrew/cmd/update-report.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb
index aa1fd244d..374bbbd73 100644
--- a/Library/Homebrew/cmd/update-report.rb
+++ b/Library/Homebrew/cmd/update-report.rb
@@ -547,6 +547,8 @@ class Reporter
end
class ReporterHub
+ extend Forwardable
+
attr_reader :reporters
def initialize
@@ -564,9 +566,7 @@ class ReporterHub
@hash.update(report) { |_key, oldval, newval| oldval.concat(newval) }
end
- def empty?
- @hash.empty?
- end
+ delegate :empty? => :@hash
def dump
# Key Legend: Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R)