Try to convert obj into a hash, using to_hash
method. Returns converted hash or nil if obj cannot be converted for any reason.
Hash.try_convert({1=>2}) # => {1=>2} Hash.try_convert("1=>2") # => nil
Returns an IO
object representing the current file. This will be a File
object unless the current file is a stream such as STDIN.
For example:
ARGF.to_io #=> #<File:glark.txt> ARGF.to_io #=> #<IO:<STDIN>>
Reads at most maxlen bytes from the ARGF
stream in non-blocking mode.
Returns the current list of converters in effect for headers. See CSV::new
for details. Built-in converters will be returned by name, while others will be returned as is.
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.
Convenience method for Shell::CommandProcessor.unalias_command