check type in ruby
# Define a variable with a value
variable = "Hello, World!"
# Use the `class` method to determine the data type of the variable
data_type = variable.class
# Print the result
puts "The data type of the variable is: #{data_type}"
# Define a variable with a value
variable = "Hello, World!"
# Use the `class` method to determine the data type of the variable
data_type = variable.class
# Print the result
puts "The data type of the variable is: #{data_type}"