Skip to content

Instantly share code, notes, and snippets.

@mindplace
Created March 16, 2016 21:43
Show Gist options
  • Select an option

  • Save mindplace/82acb8ab901326ea1a85 to your computer and use it in GitHub Desktop.

Select an option

Save mindplace/82acb8ab901326ea1a85 to your computer and use it in GitHub Desktop.
my_library.add_book("The Well Grounded Rubyist", "David A. Black")
my_library.add_book("JavaScript & JQuery", "Jon Duckett")
my_library.add_book("Essential Algorithms", "Rod Stephens")
my_library.add_book("Clean Code", "Robert C. Martin")
p my_library # output:
# #<Library:0x00000001296750 @books=[
# #<Book:0x00000001296610 @title="The Well Grounded Rubyist", @author="David A. Black">,
# #<Book:0x000000012964d0 @title="JavaScript & JQuery", @author="Jon Duckett">,
# #<Book:0x00000001296390 @title="Essential Algorithms", @author="Rod Stephens">,
# #<Book:0x00000001296200 @title="Clean Code", @author="Robert C. Martin">
# ]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment