Sha256: 692f482891ca9acfb1c954a531a817cba0fbbb711946acb9663c5839703c0afe
Contents?: true
Size: 258 Bytes
Versions: 27
Compression:
Stored size: 258 Bytes
Contents
module CompressHelper def strip_indent(string) lines = string.lines match = /\A( *)/.match(lines.first) return string unless match whitespaces = match[1].to_s.length lines.map { |line| line[whitespaces..-1] }.join end end
Version data entries
27 entries across 27 versions & 1 rubygems