Project

unindent

0.03
No release in over 3 years
Low commit activity in last 3 years
Ruby method to unindent strings. Useful for multiline strings embeded in already indented code.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Summary

Simple Ruby method, String#unindent, to unindent strings. Useful for multi-line strings embeded in already indented code.

Examples

class Profile
  def default_text
    <<-STR
      Anonymous Coward
        - Community Guest
    STR
  end
end

puts Profile.new.default_text
#      Anonymous Coward
#        - Community Guest

puts Profile.new.default_text.unindent
#Anonymous Coward
#  - Community Guest

Install

gem install unindent