Is there a Ruby equivalent of the Java Scanner?
If I have a string like "hello 123 hi 234"
In Java I could do
Scanner sc = new Scanner("hello 123 hi 234");
String a = sc.nextString();
int b = sc.nextInt();
String c = sc.nextString();
int d = sc.nextInt();
How would you do this in Ruby?