lib/cyberarm_engine/background.rb in cyberarm_engine-0.8.1 vs lib/cyberarm_engine/background.rb in cyberarm_engine-0.9.0

- old
+ new

@@ -156,11 +156,22 @@ elsif background.is_a?(Hash) @top_left = background[:top_left] @top_right = background[:top_right] @bottom_left = background[:bottom_left] @bottom_right = background[:bottom_right] + elsif background.is_a?(Range) + set([background.begin, background.begin, background.end, background.end]) else raise ArgumentError, "background '#{background}' of type '#{background.class}' was not able to be processed" end end end -end \ No newline at end of file +end + +# Add <=> method to support Range based gradients +module Gosu + class Color + def <=>(other) + self + end + end +end