class GD2::Palette::IndexedColor
Public Instance Methods
each() { |color| ... }
click to toggle source
Iterate through every color allocated in this palette.
# File lib/gd2/palette.rb, line 180 def each #:yields: color (0...MAX_COLORS).each do |i| color = self[i] yield color unless color.nil? end self end