Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.56 KB | None | 0 0
  1. class Persona
  2.  
  3.     def initialize
  4.         @trabajo = False
  5.         @experiencia = 0
  6.        
  7.         puts "Ahora programo en Ruby y soy re top"
  8.     end
  9.    
  10.    
  11.     def getTrabajo
  12.         if @experiencia > 0 then
  13.             @trabajo = True
  14.             puts "Haz conseguido un empleo. En buenahora tigrecillo!"
  15.             @experiencia += 1
  16.         else
  17.             puts "lo sentimos pero hemos tomado a alguien mรกs"
  18.             self.insultar
  19.         end
  20.     end
  21.    
  22.     def insultar
  23.         puts "Andate a la re concha de tu madre"
  24.     end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement