Sha256: 6a461102e9ec2909c6aac31e1f466d2a26b5269ff3449f6f3e45f14ba072801a
Contents?: true
Size: 567 Bytes
Versions: 3
Compression:
Stored size: 567 Bytes
Contents
module Dedalus class ImageRepository def self.lookup(path) @images ||= {} @images[path] ||= Gosu::Image.new(path) @images[path] end def self.lookup_tiles(path, width, height) @tiles ||= {} @tiles[path] ||= Gosu::Image::load_tiles(path, width.to_i, height.to_i) @tiles[path] end def self.lookup_recording(id,width,height,window,&blk) # p [ :lookup_recording, id: id ] @recordings ||= {} @recordings[id] ||= window.record(width.to_i,height.to_i,&blk) @recordings[id] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dedalus-0.2.17 | lib/dedalus/image_repository.rb |
dedalus-0.2.16 | lib/dedalus/image_repository.rb |
dedalus-0.2.15 | lib/dedalus/image_repository.rb |