Sha256: e715a4574937c3c5087a8df55dc64f990e48906fdb5798d50a09e7e7031782f4
Contents?: true
Size: 250 Bytes
Versions: 3
Compression:
Stored size: 250 Bytes
Contents
module Rocx module Properties class PositiveIntegerProperty < IntegerProperty def valid? super && value >= 0 end def invalid_message "Invalid #{name}: must be a positive integer" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rocx-0.7.0 | lib/rocx/properties/positive_integer_property.rb |
rocx-0.6.0 | lib/rocx/properties/positive_integer_property.rb |
rocx-0.5.8 | lib/rocx/properties/positive_integer_property.rb |