This method is a shortcut for converting a single row (Array
) into a CSV
String
.
The options
parameter can be anything CSV::new()
understands. This method understands an additional :encoding
parameter to set the base Encoding
for the output. This method will try to guess your Encoding
from the first non-nil
field in row
, if possible, but you may need to use this parameter as a backup plan.
The :row_sep
option
defaults to $INPUT_RECORD_SEPARATOR
($/
) when calling this method.
The encoded :quote_char
used in parsing and writing. See CSV::new
for details.
Serialization support for the object returned by _getobj_.
Reinitializes delegation from a serialized object.
Creates a new compiler for ERB
. See ERB::Compiler.new for details
‘each_option’ is an alias of ‘each’.
Returns true if the ipaddr is an IPv4-mapped IPv6 address.
Returns true if the ipaddr is an IPv4-compatible IPv6 address.
Returns a new ipaddr built by converting the native IPv4 address into an IPv4-mapped IPv6 address.
Returns a new ipaddr built by converting the native IPv4 address into an IPv4-compatible IPv6 address.
Returns the Ruby source filename and line number of the binding object.
Returns range or nil
Hadamard product
Matrix[[1,2], [3,4]].hadamard_product(Matrix[[1,2], [3,2]]) => 1 4 9 8
mtch.values_at(index, ...) -> array
Uses each index to access the matching values, returning an array of the corresponding matches.
m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie") m.to_a #=> ["HX1138", "H", "X", "113", "8"] m.values_at(0, 2, -2) #=> ["HX1138", "X", "113"] m = /(?<a>\d+) *(?<op>[+\-*\/]) *(?<b>\d+)/.match("1 + 2") m.to_a #=> ["1 + 2", "1", "+", "2"] m.values_at(:a, :b, :op) #=> ["1", "2", "+"]
Load the given PStore
file. If read_only
is true, the unmarshalled Hash
will be returned. If read_only
is false, a 3-tuple will be returned: the unmarshalled Hash
, a checksum of the data, and the size of the data.
Ensures that names
only includes names for the :rdoc, :clobber_rdoc and :rerdoc. If other names are given an ArgumentError
is raised.