summaryrefslogtreecommitdiff
path: root/lib/library.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/library.rb')
-rw-r--r--lib/library.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/library.rb b/lib/library.rb
new file mode 100644
index 0000000..494d46f
--- /dev/null
+++ b/lib/library.rb
@@ -0,0 +1,11 @@
+class Library
+ def initialize
+ @books = []
+ end
+ def add(book)
+ @books << book
+ end
+ def contains(title)
+ @books.find { |book| book.title == title } != nil
+ end
+end