class Fray::Data::ErrorSet
Public Class Methods
new(array)
click to toggle source
Calls superclass method
# File lib/fray/data/error_set.rb, line 8 def initialize(array) if array.all?{|elt| elt.is_a?(Fray::Data::Error)} super(array) self.freeze else msg = "All elements of a Fray::Data::ErrorSet must be instances of Fray::Data::Error. Got: #{array.inspect}" raise ArgumentError, msg end end