Skip to content

Instantly share code, notes, and snippets.

@ahmedeshaan
Created February 16, 2015 04:10
Show Gist options
  • Save ahmedeshaan/dba67a7a9817fc8f3011 to your computer and use it in GitHub Desktop.
Save ahmedeshaan/dba67a7a9817fc8f3011 to your computer and use it in GitHub Desktop.
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