Four simple steps:
You can click the default unformatted code above to view the result.
Ruby Online Formatter can beautify your compressed Ruby code, making your Ruby code more readable.
It also makes it easier for developers to read other developers' code.
Before Formatting
def example_method arg1,arg2
result=arg1+arg2
puts "The result is #{result}"
end
After Formatting
def example_method(arg1, arg2)
result = arg1 + arg2
puts "The result is #{result}"
end