I have an array of objects with one instance variable:
oranges_array =
[#<Orange:0x007faade859ea0 @diameter=2.7>,
#<Orange:0x007faade859ef0 @diameter=2.8>,
#<Orange:0x007faade859f40 @diameter=2.6>]
For example, how would I access the diameter instance variables? I want to eventually get their average. Do I need to or am I on the right track in thinking I maybe use an each loop to shovel each diameter into its own array then use inject? Or is there a simpler way to access the diameter variables? Thanks!