MonsterEncyclopedia

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/monster_encyclopedia. To experiment with that code, run bin/console for an interactive prompt.

Hello and thankyou for using the Monster Encyclopedia! this program is a useful application for all your monster hunting needs! It can be used to view documented monster details, add newly discovered monsters to your database or remove monsters if they have been proven false! It utilizes the gems colorize, tty-prompt, artii and csv for a great user experience! Have fun.

-GitHub -Trello

Tests

Installation

Add this line to your application's Gemfile:

gem 'monster_encyclopedia'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install monster_encyclopedia

Usage

When running Monster Encyclopedia you will be briefly greeted on the opening screen before the menu launches.

Menu: This is the hub of the application and can be navigated with the arrow keys, press enter to select. The menu consists of 4 options: -View Monsters -Add Monster -Remove Monster -Exit

View Monsters: If you select the view monster option the program will call on the csv database and print the data to the screen, monsters will be ordered by name alphabetically and will also show where they have been seen followed by a description of the monster.

Add Monsters: If you select add monster option from the menu you will be prompted to write in the name, location and description of a monster. After completing these 3 steps you will be asked to confirm that what you have input is correct you can press 1 or 2 and enter to confirm: -Press 1 to confirm your input and append the csv database with your new entry. -Press 2 if your information is incorrect or you change your mind about adding a new entry you can select this option and it will not append the csv

Remove Monster: If you select this option the screen will be populated with only the names of the monsters from the csv, you will be prompted to type the name of the monster you wish to remove from the database. *To ensure you don't accidentally remove the wrong monster you must type the name of the monster exactly how it appears on screen(case sensitive)

Exit: If you select this option the program will display a goodby message accompanied by the logo before the program closes.

Features

Persistent memory: This application communicates with a csv file which allows it to read, write and re-write data. It will even store the applications data after the program closes! -Read: When reading from the csv first the program 'requires csv' then reads in the information and stores it in a variable. It then uses this variable to print to screen for the user. -Write: When writing to the csv the program utilizes the -ab function to append the csv with a new entry. -Re-write: When deleting something from the csv it combines both read and write functions by reading in the csv and converting it to an array of hashes if the user input is the same as a monster name it will remove that monster from the array and then use the -w function to overwrite the csv data.

Gem integration: The Monster Encyclopedia utilizes multiple gems that make it easier to navigate the application and enhance its appearance. -TTY Prompt: Allows the user to navigate the main menu using the arrow keys -Colorize: Adds a splash of colour to the application! -Artii: Was used to make a logo for startup and shutdown.

Statement of Purpose

The Application: - The monster Encyclopedia will allow users to view, add and remove "entries" in the encyclopedia which will consist of monster name, location and description. Why: - The monster encyclopedia will allow adventurers to keep track of their discoveries in an organized logbook type application. Target Audience: - The target audience is unorganized scientists and monster hunters that need an application to track their discoveries and experiments. How: - The app will be easy to navigate utilizing with simple instructions built into the app telling the user what to do and how to use it. -the menu will be traversable with the arrow keys and enter to select. -When adding or removing a monster entry the user will be required to type in information.

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/monster_encyclopedia. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the MonsterEncyclopedia project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

UML