Sha256: 11d8a6bbb28d4f1366e28cf418172488593f09cf94559f35b967e2fb84cb8712
Contents?: true
Size: 358 Bytes
Versions: 12
Compression:
Stored size: 358 Bytes
Contents
module Flipper module Types class Percentage < Type def initialize(value) value = Typecast.to_percentage(value) if value < 0 || value > 100 raise ArgumentError, "value must be a positive number less than or equal to 100, but was #{value}" end @value = value end end end end
Version data entries
12 entries across 12 versions & 1 rubygems