Class: XcodeProject::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/xcodeproject/formatter.rb

Instance Method Summary collapse

Constructor Details

#initializeFormatter

Returns a new instance of Formatter.



25
26
27
# File 'lib/xcodeproject/formatter.rb', line 25

def initialize
	@counter = 0
end

Instance Method Details

#decObject



33
34
35
# File 'lib/xcodeproject/formatter.rb', line 33

def dec
	@counter -= 1
end

#incObject



29
30
31
# File 'lib/xcodeproject/formatter.rb', line 29

def inc
	@counter += 1
end

#t1Object



37
38
39
# File 'lib/xcodeproject/formatter.rb', line 37

def t1
	"\n" + "\t" * @counter
end

#t2Object



41
42
43
# File 'lib/xcodeproject/formatter.rb', line 41

def t2
	"\n" + "\t" * (@counter + 1)
end