hybridgroup / kidsruby

KidsRuby is a Ruby programming environment meant for kids to learn and have fun!
http://kidsruby.com
Other
336 stars 104 forks source link

Add Turtle#rgb instance method #44

Closed bitaxis closed 12 years ago

bitaxis commented 12 years ago

From reading the docs, I expect the following code to work:

Turtle.draw do
  background rgb(255, 100, 50)
end

However, the above does not work. Instead, it needs to be the following:

Turtle.draw do
  background Turtle.rgb(255, 100, 50)
end

This is not very DRY-ish. So, please add #rgb as an instance method to Turtle class.