Last active
March 14, 2016 19:02
-
-
Save spanuska/961ef156b4bd3639d58e 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 Book | |
attr_accessor :title, :author | |
def initialize(args) | |
args = defaults.merge(args) | |
@title = args[:title] | |
... | |
end | |
def store_book | |
# logic for storing the book at a location on the shelf | |
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