aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/checkable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/checkable.rb')
-rw-r--r--Library/Homebrew/cask/lib/hbc/checkable.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/checkable.rb b/Library/Homebrew/cask/lib/hbc/checkable.rb
index 03f052629..604dd3f89 100644
--- a/Library/Homebrew/cask/lib/hbc/checkable.rb
+++ b/Library/Homebrew/cask/lib/hbc/checkable.rb
@@ -1,29 +1,27 @@
module Hbc
module Checkable
def errors
- Array(@errors)
+ @errors ||= []
end
def warnings
- Array(@warnings)
+ @warnings ||= []
end
def add_error(message)
- @errors ||= []
- @errors << message
+ errors << message
end
def add_warning(message)
- @warnings ||= []
- @warnings << message
+ warnings << message
end
def errors?
- Array(@errors).any?
+ errors.any?
end
def warnings?
- Array(@warnings).any?
+ warnings.any?
end
def result