SHARE
TWEET

Untitled

a guest Aug 17th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Languages
  2.  
  3.     # The initialize method is the constructor.  The @val is
  4.     # an object value.
  5.   def initialize(name, role)
  6.     @name = name
  7.     @role = role
  8.   end
  9.  
  10.   # Set it and get it.
  11.   def setLanguages()
  12.     languages = ["python", "javascript", "go", "c++", "java", "php", "swift", "scala"];
  13.     number = rand 8
  14.     for lang in languages do
  15.       if lang == languages[number]
  16.         puts "A #{@name} le gusta ser , #{@role} , pero no le gusta prorgramar en #{lang}"
  17.       else
  18.         puts "#{@name} sera un buen #{@role} en #{lang}"
  19.       end
  20.     end
  21.   end
  22. end
  23.  
  24. a = Languages.new('Henry', 'FullStack')
  25. a.setLanguages()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top