Class Array
In: lib/indentation/array_mod.rb
Parent: Object

Methods

Public Instance methods

Appends a given separator(s) to all but the last element in an array of Strings or if performed on an array of arrays, appends the separator element to the end of each array except the last

Append the given separator(s) to the current array

Join an array of strings using English list punctuation.

Return an indented array of strings (or an array of other arrays containing strings) Arguments:

  • num - How many of the specified indentation to use.
          Default for spaces is 2. Default for other is 1.
          If set to a negative value, removes that many of the specified indentation character,
          tabs, or spaces from the beginning of the string
    
  • i_char - Character (or string) to use for indentation

Apply indentation to this array Arguments:

  • num - How many of the specified indentation to use.
          Default for spaces is 2. Default for other is 1.
          If set to a negative value, removes that many of the specified indentation character,
          tabs, or spaces from the beginning of the string
    
  • i_char - Character (or string) to use for indentation

Find the least indentation of all elements and remove that amount (if any) Can pass an optional modifier that changes the indentation amount removed

Replaces the current array with one that has its indentation reset Can pass an optional modifier that changes the indentation amount removed

[Validate]