Indent Ruby

2.2

6 votes
Ad-Hoc, Medium, Stacks
Problem

Write your program in Ruby which takes an un-indented Ruby code as string and outputs the indented Ruby code as string.

Input Format A string which is un-indented Ruby code

Output Format A string which is indented Ruby code

Time Limit: 5
Memory Limit: 256
Source Limit:
Explanation

Indentation is of 2 spaces.

Editor Image

?