module IceCube::Validations::Count
Public Instance Methods
count(max)
click to toggle source
# File lib/ice_cube/validations/count.rb, line 10 def count(max) unless max.nil? || max.is_a?(Fixnum) raise ArgumentError, "Expecting Fixnum or nil value for count, got #{max.inspect}" end @count = max replace_validations_for(:count, max && [Validation.new(max, self)]) self end
occurrence_count()
click to toggle source
Value reader for limit
# File lib/ice_cube/validations/count.rb, line 6 def occurrence_count @count end