Sha256: 5de05b455de830d0a90a539553c53eea8c5425416be565c18a20b950e24f3822
Contents?: true
Size: 382 Bytes
Versions: 10
Compression:
Stored size: 382 Bytes
Contents
require 'flipper/typecast' module Flipper module Types class Percentage < Type def initialize(value) value = Typecast.to_number(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
10 entries across 10 versions & 1 rubygems