Giter VIP home page Giter VIP logo

2library's Introduction

Library Challenge

the mission

โ€œWe need an app where both the visitors and the library can see if a list of books is available, it would be nice to see both the title and the author of the book. The library needs to store these books in a file where we can easily check if a book is available or not. The library also needs the visitors to check out books after finding the title they want. Depending on the time of the checkout the library needs the books to be returned within a month and obviously, it would be nice for the visitor to know which date to return the book.โ€

what it do

this i a library. we have a selection och three books. all by the same author, Tove Jansson, because you really don't need anybody else. in this library you have the ability to borrow a book which will give you information about the title, author, return-date but unfortunately not the actual book. you will also have the ability to return the book which will give you the same information but of course without the return-date.

it's easy

  1. go to irb
  2. require 'yaml'

if you are a visitor

  1. load './lib/visitor.rb'
  2. 'your name' = Visitor.new the books have a number between 1 - 3. you pick a book by choosing between
  3. 'your name'.borrow_book1, 'your name'.borrow_book2 or 'your name'.borrow_book3 and you return the book with the same number
  4. 'your name'.return_book1, 'your name'.return_book2 or 'your name'.return_book3

if you are a librarian you ignore step 3-6 and type

  1. load './lib/library.rb'
  2. 'your name' = Library.new
  3. to check what's available you type 'your name'.is_available?
  4. to search for a book you type 'your name'.search_title('the title')

Dependencies

  • Ruby
  • YAML
  • VS Code
  • Pry
  • Rspec
  • The Terminal

shout-out

Sara Lundkvist

2library's People

Contributors

viktorhek avatar noelryn avatar diraulo avatar faraznaeem avatar sealfury avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.