Summary
Simple Ruby method to unindent strings. Useful for multiline strings embeded in already indented code.
Examples
class Profile
def default_text
" Anonymous Coward\n - Community Guest\n STR\nend\n".unindent
end
puts Profile.new.default_text
will output: Anonymous Coward
- Community Guest
instead of:
Anonymous Coward
- Community Guest