class HMap::Executable::Indenter

Helper class that allows to write to an {IO} instance taking into account the UI indentation level.

Attributes

indent[R]

@return [Fixnum] The indentation level of the UI.

io[R]

@return [IO] the {IO} to which the output should be printed.

Public Class Methods

new(io = nil) click to toggle source

Init a new Indenter

@param [IO] io @see io

# File lib/cocoapods-hmap/executable.rb, line 212
def initialize(io = nil)
  @io = io
  @indent = ' ' * 1
end

Public Instance Methods

<<(value) click to toggle source

Stores a portion of the output and prints it to the {IO} instance.

@param [String] value

the output to print.

@return [void]

Calls superclass method
# File lib/cocoapods-hmap/executable.rb, line 224
def <<(value)
  super
  io << "#{indent}#{value}" if io
end