Class: XcodeProject::Formatter
- Inherits:
-
Object
- Object
- XcodeProject::Formatter
- Defined in:
- lib/xcodeproject/formatter.rb
Instance Method Summary collapse
- #dec ⇒ Object
- #inc ⇒ Object
-
#initialize ⇒ Formatter
constructor
A new instance of Formatter.
- #t1 ⇒ Object
- #t2 ⇒ Object
Constructor Details
#initialize ⇒ Formatter
Returns a new instance of Formatter.
3 4 5 |
# File 'lib/xcodeproject/formatter.rb', line 3 def initialize @counter = 0 end |
Instance Method Details
#dec ⇒ Object
11 12 13 |
# File 'lib/xcodeproject/formatter.rb', line 11 def dec @counter -= 1 end |
#inc ⇒ Object
7 8 9 |
# File 'lib/xcodeproject/formatter.rb', line 7 def inc @counter += 1 end |
#t1 ⇒ Object
15 16 17 |
# File 'lib/xcodeproject/formatter.rb', line 15 def t1 "\n" + "\t" * @counter end |
#t2 ⇒ Object
19 20 21 |
# File 'lib/xcodeproject/formatter.rb', line 19 def t2 "\n" + "\t" * (@counter + 1) end |