Class | Magick::ImageList |
In: |
ext/RMagick/rmmain.c
lib/RMagick.rb |
Parent: | Array |
display | -> | __display__ |
map | -> | __ary_map__ |
respond_to? | -> | __respond_to__? |
Ensure respond_to? answers correctly when we are delegating to Image |
scene | [R] |
Compare ImageLists Compare each image in turn until the result of a comparison is not 0. If all comparisons return 0, then
return if A.scene != B.scene return A.length <=> B.length
Enumerable (or Array) has a map method that conflicts with our own map method. RMagick.so has defined a synonym for that map called Array#ary_map. Here, we define Magick::ImageList#map to allow the use of the Enumerable/Array#map method on ImageList objects.
The ImageList class supports the Magick::Image class methods by simply sending the method to the current image. If the method isn’t explicitly supported, send it to the current image in the array. If there are no images, send it up the line. Catch a NameError and emit a useful message.