Module: Tins::To

Included in:
Object
Defined in:
lib/tins/to.rb

Instance Method Summary collapse

Instance Method Details

#to(string) ⇒ Object



3
4
5
6
# File 'lib/tins/to.rb', line 3

def to(string)
  shift_width = (string[/\A\s*/]).size
  string.gsub(/^[^\S\n]{0,#{shift_width}}/, '')
end