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