RubyGarage Library Task

Main Idea

There are 5 classes which are related with each other:

  1. Author:

    • name - full author's name
    • biography
  2. Book:

    • title
    • author
  3. Reader:

    • name - full reader's name
    • email
    • city
    • street
    • house - building number
  4. Order:

    • book - Book instance
    • reader - Reader instance
    • date - by default - Time.now
  5. Library:

    Stores the collections of instances of classes, described above. By default they are empty arrays.

    • authors
    • books
    • orders
    • readers

And some methods which allow you get some statistics about the whole Library and do some manipulations with it:

  1. Write and Read to/from .yaml file.
  2. Generate seeds for Library.
  3. Get most popular book and reader.
  4. Get the amount of people who ordered one of the three most popular books.

Dependencies

There is only two dependencies:

  • gem Faker to generate seeds
  • ruby 2.4.0