Created
February 16, 2015 04:10
-
-
Save ahmedeshaan/dba67a7a9817fc8f3011 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ObscuringReferences | |
attr_reader :data | |
def initialize(data) | |
@data = data | |
end | |
def diameters | |
data.collect { |cell| | |
cell[0] + (cell[1] * 2) } | |
end | |
end | |
new_var = ObscuringReferences.new([[25,20],[65,34]]) | |
puts new_var.diameters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment