Sha256: cc8c3f6915663ec00950d343bbb003bdd2d188e5d6973b5cf8db29f19a3491a3
Contents?: true
Size: 358 Bytes
Versions: 2
Compression:
Stored size: 358 Bytes
Contents
module Cheers class Background < Component attr_reader :color def initialize(canvas, randomizer) super @color = Avatar::BACKGROUND_COLORS.sample(random: randomizer) end def apply # Work around instance_eval wonkiness by declaring local variables: color = self.color colored_image(color) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cheers-0.0.4 | lib/cheers/background.rb |
cheers-0.0.3 | lib/cheers/background.rb |