It's calling the fromFile method on the io.Source object. Package names are lower-case by convention, class and object names are capitalized camel-case, and methods are lower-case camel-case.
Also, 1.upto(10) can also be written as (1..10) in ruby
Also, 1.upto(10) can also be written as (1..10) in ruby
You can also import singleton methods, so if you write
import io.Source._
then all the fromX methods are available directly.