An experimental implementation of a TUI that models a vending machine. Mostly an exercise in OOP.
- Ruby 2.6.3
- SQLite3
Issue bin/setup
to install dependencies and set up the database.
Issue bin/start
to start the TUI.
Issue bundle exec rspec
to run the test suite. UI-managing components are
designed for testability but are left untested for now.
The app architecture draws inspiration from MVC- and MVVM-architected web apps.
Manage persistence logic. Since ActiveRecord
is the ORM here,
models inherit from an ApplicationRecord
base class.
ViewModel-like objects that manage presentation-related logic.
Controller-like coordinating classes that manage the user-interaction loop and dispatch based on user menu selections.