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.



3
4
5
# File 'lib/xcodeproject/formatter.rb', line 3

def initialize
	@counter = 0
end

Instance Method Details

#decObject



11
12
13
# File 'lib/xcodeproject/formatter.rb', line 11

def dec
	@counter -= 1
end

#incObject



7
8
9
# File 'lib/xcodeproject/formatter.rb', line 7

def inc
	@counter += 1
end

#t1Object



15
16
17
# File 'lib/xcodeproject/formatter.rb', line 15

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

#t2Object



19
20
21
# File 'lib/xcodeproject/formatter.rb', line 19

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