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.



27
28
29
# File 'lib/xcodeproject/formatter.rb', line 27

def initialize
	@counter = 0
end

Instance Method Details

#decObject



35
36
37
# File 'lib/xcodeproject/formatter.rb', line 35

def dec
	@counter -= 1
end

#incObject



31
32
33
# File 'lib/xcodeproject/formatter.rb', line 31

def inc
	@counter += 1
end

#t1Object



39
40
41
# File 'lib/xcodeproject/formatter.rb', line 39

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

#t2Object



43
44
45
# File 'lib/xcodeproject/formatter.rb', line 43

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