From 3b4ee58c491f164c2751c1c0f941568c35fb0ac6 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 26 Jun 2017 07:30:28 +0200 Subject: Refactor using `Forwardable` and `DelegateClass`. --- Library/Homebrew/caveats.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Library/Homebrew/caveats.rb') diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index ee09063fd..2d0ceeb48 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -1,4 +1,6 @@ class Caveats + extend Forwardable + attr_reader :f def initialize(f) @@ -25,9 +27,7 @@ class Caveats caveats.compact.join("\n") end - def empty? - caveats.empty? - end + delegate [:empty?, :to_s] => :caveats private -- cgit v1.2.3