Class: Pod::Executable::Indenter
- Inherits:
-
Array
- Object
- Array
- Pod::Executable::Indenter
- Defined in:
- lib/cocoapods/executable.rb
Overview
Helper class that allows to write to an IO instance taking into account the UI indentation lever.
Instance Attribute Summary collapse
-
#indent ⇒ Fixnum
The indentation level of the UI.
-
#io ⇒ IO
The IO to which the output should be printed.
Instance Method Summary collapse
-
#<<(value) ⇒ void
Stores a portion of the output and prints it to the IO instance.
-
#initialize(io = nil) ⇒ Indenter
constructor
A new instance of Indenter.
Constructor Details
Instance Attribute Details
#indent ⇒ Fixnum
Returns The indentation level of the UI.
91 92 93 |
# File 'lib/cocoapods/executable.rb', line 91 def indent @indent end |
#io ⇒ IO
Returns the IO to which the output should be printed.
95 96 97 |
# File 'lib/cocoapods/executable.rb', line 95 def io @io end |
Instance Method Details
#<<(value) ⇒ void
This method returns an undefined value.
Stores a portion of the output and prints it to the IO instance.
111 112 113 114 115 |
# File 'lib/cocoapods/executable.rb', line 111 def <<(value) super ensure @io << "#{ indent }#{ value }" if @io end |