lib/ase/palette.rb in ase-1.0.3 vs lib/ase/palette.rb in ase-2.0.0

- old
+ new

@@ -1,7 +1,9 @@ class ASE class Palette + include Enumerable + attr_accessor :name, :colors def initialize(name) @name = name @colors = {} @@ -23,9 +25,13 @@ def length @colors.length end alias :size :length + + def each(&block) + @colors.each(&block) + end def method_missing(method, *args, &block) if @colors.has_key?(method.to_s) return @colors[method.to_s] end \ No newline at end of file