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 level.
Instance Attribute Summary collapse
-
#indent ⇒ Fixnum
readonly
The indentation level of the UI.
-
#io ⇒ IO
readonly
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
Init a new Indenter.
Constructor Details
Instance Attribute Details
#indent ⇒ Fixnum (readonly)
Returns The indentation level of the UI.
194 195 196 |
# File 'lib/cocoapods/executable.rb', line 194 def indent @indent end |
#io ⇒ IO (readonly)
Returns the IO to which the output should be printed.
198 199 200 |
# File 'lib/cocoapods/executable.rb', line 198 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.
216 217 218 219 |
# File 'lib/cocoapods/executable.rb', line 216 def <<(value) super io << "#{indent}#{value}" if io end |