Assigning information to a variable in Ruby is as easy as it was in the pseudocode . By using the assignment operator (the = character), you can store any information in a variable. In this example, a message to be printed to the screen is stored in the variable var1 and a number is stored in var2. The information in var1 and var2 could be used later by any Ruby statement.
irb(main):001:0> var1 = "Ruby is fun and easy!"
=> "Ruby is fun and easy!"
irb(main):002:0> var2 = 42
=> 42

