# Inclusive range
x = 1..10
# Exclusive range
x = 1...10
# Obtener el primero
x.begin
x.first
# Obtener el ultimo
x.end
x.last
# Include
x.inclue?(1)
# Expandirlo
[*x]
Created
September 20, 2017 23:06
-
-
Save jcaristy/e69207307c7787b944706b6644ad50d5 to your computer and use it in GitHub Desktop.
[RoR: Ranges] #ruby
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment