Skip to main content

Questions tagged [ruby]

Ruby is a multi-platform, open-source, dynamic, object-oriented, interpreted language created by Yukihiro Matsumoto (Matz) in 1993.

3 votes
1 answer
73 views

I have implemented my own version of Ruby's Array uniq-method (Ruby docs - Class array) as a monkey patch on Array. Method-impl.: ...
michael.zech's user avatar
  • 5,042
4 votes
2 answers
124 views

Task: Implement a method, which receives an array of strings as argument. The strings are dates in the format "MM**DD**YYYY". For example: "11**03**2024". Add 30 to each of the ...
michael.zech's user avatar
  • 5,042
6 votes
2 answers
459 views

Link to kata: linkRank: 6 kyuKata author: @rsalgado I have been recently learning Ruby-lang and have been attempting to solve the following kata from Codewars involving Goldbach's Conjecture: ...
CrSb0001's user avatar
  • 619
4 votes
2 answers
254 views

I have tried to implement the Array-shuffle method myself. Haven't had a look on some similar algorithm-examples by purpose and tried to figure out something myself. The actual Array-extension: ...
michael.zech's user avatar
  • 5,042
4 votes
1 answer
212 views

I like to have a script which fetches data from a REST-API then writes the data into a CSV file. Here's what I've got so far (prototype, using a publicly accessible dummy-API): ...
michael.zech's user avatar
  • 5,042
2 votes
1 answer
75 views

Initial situation: Each week a nested folder-/file-structure has to be created. Content is added to the files. Afterward the structure is copied to a shared-folder for long-time documentation. Example:...
michael.zech's user avatar
  • 5,042
5 votes
3 answers
136 views

I have written a method, which checks for Palindrome and attached it to the String-class. Here's the code: ...
michael.zech's user avatar
  • 5,042
3 votes
0 answers
52 views

We are using Searchkick to run our elasticsearch and Pundit to authorize users for specific actions. Below is our module SearchkickScope that does it's best to ...
Romuloux's user avatar
2 votes
1 answer
85 views

previusly I make a post for Session Logic for User Verification in Rails Migration. Now the improvement version following advice of the comments is here. The problem was the use of `` for executing in ...
ZAMA's user avatar
  • 55
3 votes
1 answer
115 views

This is a logic to create sessions on RoR 7.1.2 based on the last version of the website which was in vanilla PHP, with the upgrade I have to deal with the users that were already signed up but not ...
ZAMA's user avatar
  • 55
1 vote
1 answer
124 views

The task A file similar to the following is provided. ...
francesco's user avatar
1 vote
1 answer
80 views

Task description: Implement a generate_unique_phone_numbers function. The function shall parse the given text-file. Content-example: ...
michael.zech's user avatar
  • 5,042
3 votes
3 answers
178 views

Task Write a Ruby function, which accepts a path to a text file and returns a string consisting of the last n lines in reversed order, separated by commas. Example input file: ...
michael.zech's user avatar
  • 5,042
1 vote
1 answer
168 views

I wrote the simple calculator in Ruby. This is my first program in this language. I've switched recently from Python to Ruby. What do you think about my work? Thanks ...
whiteman808's user avatar
1 vote
4 answers
289 views

Task: Implement a function which loops from 1 to 100 and prints "Fizz" if the counter is divisible by 3. Prints "Buzz" if the counter is divisible by 5 and "FizzBuzz", ...
michael.zech's user avatar
  • 5,042

15 30 50 per page
1
2 3 4 5
108