###Cheat Sheet RUBY and rails
Created
October 13, 2016 19:23
-
-
Save cyrilferte/300b9149bc80250f3ec74d1b2fea3aa5 to your computer and use it in GitHub Desktop.
groupe_1 = [4.1, 5.5, 3.2, 3.3, 6.1, 3.9, 4.7]
groupe_2 = [7.0, 3.8, 6.2, 6.1, 4.4, 4.9, 3.0]
groupe_3 = [5.5, 5.1, 3.9, 4.3, 4.9, 3.2, 3.2]
proc
assez_grand = Proc.new { |hauteur| hauteur>= 4 }
variable in texte
"Solde: $#{@solde}."
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
def majuscule(string)
puts "#{string[0].upcase}#{string[1..-1]}"
end
majuscule("ryan comment va tu ?") # affiche "Ryan comment va tu ?"
majuscule("jane") # affiche "Jane"