Skip to content

Instantly share code, notes, and snippets.

@elcortez
Created April 18, 2019 09:54
Show Gist options
  • Save elcortez/9a8eca3a78f43c8ff3151569c2d67c9a to your computer and use it in GitHub Desktop.
Save elcortez/9a8eca3a78f43c8ff3151569c2d67c9a to your computer and use it in GitHub Desktop.
class Building
attr_reader :width, :length
attr_accessor :name
def initialize(name, width, length)
@name = name
@width = width
@length = length
end
def floor_area
@width * @length
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment