Last active
March 14, 2016 19:54
-
-
Save spanuska/488f02e6aeb4f80cc8f6 to your computer and use it in GitHub Desktop.
This file contains 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 Shelf | |
... | |
def store(@book) | |
# logic to find the correct location on itself for @book | |
end | |
end | |
class Book | |
attr_accessor :title, :author | |
def initialize(args) | |
args = defaults.merge(args) | |
@title = args[:title] | |
... | |
end | |
def defaults | |
{title: "Unknown", author: "Unknown"} | |
end | |
.... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment