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.
27 28 29 |
# File 'lib/xcodeproject/formatter.rb', line 27 def initialize @counter = 0 end |
Instance Method Details
#dec ⇒ Object
35 36 37 |
# File 'lib/xcodeproject/formatter.rb', line 35 def dec @counter -= 1 end |
#inc ⇒ Object
31 32 33 |
# File 'lib/xcodeproject/formatter.rb', line 31 def inc @counter += 1 end |
#t1 ⇒ Object
39 40 41 |
# File 'lib/xcodeproject/formatter.rb', line 39 def t1 "\n" + "\t" * @counter end |
#t2 ⇒ Object
43 44 45 |
# File 'lib/xcodeproject/formatter.rb', line 43 def t2 "\n" + "\t" * (@counter + 1) end |