Skip to content

Instantly share code, notes, and snippets.

@Sihui
Last active April 23, 2017 16:34
Show Gist options
  • Save Sihui/e437896431796395ef2eefbba179360f to your computer and use it in GitHub Desktop.
Save Sihui/e437896431796395ef2eefbba179360f to your computer and use it in GitHub Desktop.
class Burger
attr_reader :top_bun, :bottom_bun
attr_accessor :stuffing
def initialize(stuffing)
@top_bun = TOP_BUN
@stuffing = stuffing
@bottom_bun = BOTTOM_BUN
end
def cook
burger = []
burger << top_bun.cook
burger << stuffing.cook
burger << bottom_bun.cook
burger
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment