# File lib/ice_cube/validations/count.rb, line 10 def count(max) unless max.nil? || max.is_a?(Integer) raise ArgumentError, "Expecting Integer or nil value for count, got #{max.inspect}" end replace_validations_for(:count, max && [Validation.new(max, self)]) self end