Skip to content

Instantly share code, notes, and snippets.

View Proavtor's full-sized avatar

Kamil Garifull Proavtor

  • Türkiye
  • 19:26 (UTC +03:00)
View GitHub Profile
@Proavtor
Proavtor / find_celebrity.rb
Last active September 18, 2022 20:12
The code demonstrate an elegance of Ruby with its object oriented approach to solve popular task about finding a celebrity among a group of persons.
# frozen_string_literal: true
class Array
def except(value)
self - [value]
end
end
class Person
attr_reader :name, :known_persons_names