lib/sober_swag/reporting/report/value.rb in sober_swag-0.25.0 vs lib/sober_swag/reporting/report/value.rb in sober_swag-0.25.1
- old
+ new
@@ -6,9 +6,11 @@
# Basically a wrapper around an array of strings.
class Value < Base
##
# @param problems [Array<String>] problems with it
def initialize(problems)
+ raise ArgumentError, "#{problems} was not an enum" unless problems.respond_to?(:each)
+
@problems = problems
end
##
# @return [Array<String>] the problems the value had