DEV Community

Samuel Lubliner
Samuel Lubliner

Posted on • Edited on

1

Sinatra: Rock, Paper, Scissors

I made a dynamic website that allows the user to play Rock, Paper, Scissors.

The most satisfying part of this project was having a single we_play.erb that handles the html for Rock, Paper, or Scissors using the DRY principle (don't repeat yourself).

Use on every project:

sinatra-contrib gem automatically reloading code changes without having to restart the web server

better_errors gem more friendly error pages
Create a /views folder to store our ERB templates

/views/layout.erb file with standard HTML boilerplate

Configuration for this project:

bin/ folder scripts:
bin/dev starts up our web server
bin/setup will bundle install and perform other initial setup work

spec/ folder includes automated tests
rake grade command is included to run the automated tests

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay