Sha256: 7b93ef2f91bae7b6831602e39c4fcfba5f3c75e9cf91ffcc7e460f0ce7109cd6
Contents?: true
Size: 355 Bytes
Versions: 5
Compression:
Stored size: 355 Bytes
Contents
FactoryBot.define do factory :alpha, class: Hash do skip_create samples = [0, 1, 64, 128, 191, 254, 255] values = samples.each_with_object(Hash.new) do |value, hash| hex = "%02X" % value range_01 = (value / 255.to_f).round(3) hash[hex] = {rgb: range_01, rgb_255: value} end initialize_with { values } end end
Version data entries
5 entries across 5 versions & 1 rubygems