Sha256: 3ddec7120d9639d82a4da510a66eb969d43248cf9b6a9b57a5108ef6320f5391
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
Contents
require "json" module Whirly module Spinners WHIRLY = { "whirly" => { "proc" => ->(){ [0x1F600 + rand(55) ].pack("U") }, "interval" => 200 }, "random_dots" => { "proc" => ->(){ [ 0x2800 + rand(256)].pack("U") }, "interval" => 100 }, "circled_letter" => { "proc" => ->(){ [ 0x24B6 + rand(26) ].pack("U") }, "interval" => 120 }, "circled_number" => { "proc" => ->(){ [ 0x2460 + rand(9) ].pack("U") }, "interval" => 120 }, "starlike" => { "proc" => ->(){ [ 0x2729 + rand(34) ].pack("U") }, "interval" => 120 }, "mahjong" => { "proc" => ->(){ [0x1F000 + rand(44)].pack("U") }, "interval" => 200 }, "domino" => { "proc" => ->(){ [0x1F030 + rand(50)].pack("U") }, "interval" => 200 }, "vertical_domino" => { "proc" => ->(){ [0x1F062 + rand(50)].pack("U") }, "interval" => 200 }, "letters_with_parens" => { "proc" => ->(){ [0x1F110 + rand(26)].pack("U") }, "interval" => 150 }, } WHIRLY.merge! JSON.load(File.read(File.dirname(__FILE__) + "/../../../data/whirly-static-spinners.json")) WHIRLY.freeze end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
whirly-0.2.1 | lib/whirly/spinners/whirly.rb |
whirly-0.2.0 | lib/whirly/spinners/whirly.rb |