1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #661: Add unindent functionality

This commit is contained in:
Daniel Molina 2011-06-14 14:47:29 +02:00
parent f9583e415b
commit 5eeb0a7541

View File

@ -17,6 +17,17 @@
require 'optparse'
require 'pp'
class String
def unindent(spaces=nil)
unless spaces
m = self.match(/^(\s*)/)
spaces = m[1].size
end
self.gsub!(/^ {#{spaces}}/, '')
end
end
module CommandParser
OPTIONS = [
VERBOSE={