Skip to main content

All Questions

15votes
1answer
509views

Ruby chess engine gem

This is my first Ruby gem that claims to provide all the rules of the chess game. My goal was to keep this library as simple as possible via OOP principles, and I'd be glad to hear any feedback from ...
4votes
2answers
141views

Ruby CLI TicTacToe

I have done Tictactoe game in Ruby. It is my first Object Oriented project in Ruby. I would like to separate all program into a few classes such as Player Board and Game. I want to use more OOP best ...
2votes
0answers
105views

Ruby OOP Mastermind Game Code Refactor

I have finished The mastermind game. Basically, it's a game that has 2 sides, codebreaker or codemaker. If you are a codebreaker, you are guessing the colour code that the computer has chosen. If you ...
1vote
2answers
255views

Refactoring Ruby recharge REST API wrapper by using class variables

I am trying to create an API wrapper for recharge (A Shopify subscription service), I am using the HTTParty gem ...
6votes
2answers
2kviews

Bank ATM program in Ruby

After reading a bunch of Ruby tutorials, I decide to write fake ATM bank software. I've tried to use OOP design and just want to know if I'm on the right road. ...
3votes
1answer
232views

Singleton in Ruby without using Singleton module or class variable

When I need a singleton class in my Ruby code (for example, single logger for multiple classes) I usually use code like this: ...
1vote
1answer
728views

Ruby Tic-Tac-Toe two-player

As a preface, I'm very new to coding (self-learning) so if you notice any bad habits please let me know, it would be GREATLY appreciated. I'm self-learning Ruby so I don't really have a frame of ...
2votes
1answer
71views

Change architecture of Ruby app to be more object oriented, readable

I'm working on a Slack bot for service desk which sends direct message to user on a Slack when their ticket will be on user_action_needed status. I'm using AWS ...
2votes
2answers
379views

Rock, Paper, Scissors completed game

I have just completed my first Ruby OOP project. Fairly simple but still a bit time consuming as I am still learning the language. I would like feedback and ways I can improve on this and make the ...
3votes
1answer
80views

Ensure multiple steps work/saving multiple models via a service

I just thought of something new re: saving multiple objects in Rails (though Rails is not necessary). Objectives: Create an author and a tomato, but both of those must be valid. If invalid creation, ...
4votes
2answers
918views

Ruby price calculator for groceries

I am good at logic and most of the time I write working code. But I want to learn writing code which follows best practices and is very efficient. I tried to implement some of them in my code but it ...
2votes
1answer
74views

Table class to fill array structure with values

The code creates a table and adds rows and columns. Does it make sense to write the code like this? Would you design it differently? Is there a better OOP approach to this? ...
2votes
2answers
332views

github page/ DHH Score Challenge in ruby

I wrote the following code which when executed prints the score of https://github.com/dhh. ...
1vote
2answers
87views

Initiating an action based on product type

I am starting my studies with Ruby and OO and I have received a test to do about OO. I am looking for new ways to improve the scenario following object-oriented concepts. Is there a better way to ...
4votes
3answers
3kviews

Ruby banking system program

As a beginner I'd like to get any kind of feedback. The more the better. Any optimization and style mistakes? ...

153050per page
close