Class: Palindromo::Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/palindromo.rb

Class Method Summary collapse

Class Method Details

.captureObject



6
7
8
9
10
11
12
13
14
# File 'lib/palindromo.rb', line 6

def self.capture
  print "Word: "
  word = gets.chomp
  if word == word.reverse
    puts "Sí es un palíndromo"
  else
    puts "No es un palíndromo"
  end
end