Identical to CSV#convert()
, but for header rows.
Note that this method must be called before header rows are read to have any effect.
Processes fields
with @converters
, or @header_converters
if headers
is passed as true
, returning the converted field set. Any converter that changes the field into something other than a String
halts the pipeline of conversion for that field. This is primarily an efficiency shortcut.
Set
date-time format.
datetime_format
A string suitable for passing to strftime
.
Returns the date format being used. See datetime_format=
Creates a single-row matrix where the values of that row are as given in row
.
Matrix.row_vector([4,5,6]) => 4 5 6
Creates a single-column matrix where the values of that column are as given in column
.
Matrix.column_vector([4,5,6]) => 4 5 6
Returns the number of rows.
Called for dup & clone.
Returns an array of the row vectors of the matrix. See Vector
.
Returns an array of the column vectors of the matrix. See Vector
.
Called for dup & clone.
Add option switch like with on
, but at head of summary.
Add option switch like with on
, but at tail of summary.
Returns the number of threads waiting on the queue.
Returns the number of threads waiting on the queue.
Removes tracing for the specified command on the given global variable and returns nil
. If no command is specified, removes all tracing for that variable and returns an array containing the commands actually removed.
Returns a pretty printed object as a string.
In order to use this method you must first require the PP
module:
require 'pp'
See the PP
module for more information.
Ruby tries to load the library named string relative to the requiring file’s path. If the file’s path cannot be determined a LoadError
is raised. If a file is loaded true
is returned and false otherwise.
Iterates the given block for each array of consecutive <n> elements. If no block is given, returns an enumerator.
e.g.:
(1..10).each_cons(3) { |a| p a } # outputs below [1, 2, 3] [2, 3, 4] [3, 4, 5] [4, 5, 6] [5, 6, 7] [6, 7, 8] [7, 8, 9] [8, 9, 10]