Les types en ruby

String

name = 'Ned'

Integer

age = 60

Float

height = 1.85

Array

children = ['Todd', 'Rod']

Hash

ned = {name: 'Ned', age: 60}
ned[:name]

Symbol

religion = :christianity
Made with Slides.com