Sha256: 34f687d7d0298678bab03bfa443ee3a81aba9fc268ebc40ec91da0ac5332447b
Contents?: true
Size: 455 Bytes
Versions: 13
Compression:
Stored size: 455 Bytes
Contents
require 'json' module Doraemon $image_list = JSON.parse(File.read(File.join(__dir__, '../res/image_source.json'))) $image_host = "https://file.kaipao.cc" class DJImage def self.random path = $image_list.sample "#{$image_host}/#{path}" end def self.at(index) index = index % $image_list.length path = $image_list[index] "#{$image_host}/#{path}" end def self.local(path) end end end
Version data entries
13 entries across 13 versions & 1 rubygems