Returns a new 6-element array, consisting of the label, user CPU time, system CPU time, children’s user CPU time, children’s system CPU time and elapsed real time.
Returns a hash containing the same data as ‘to_a`.
Convert the Cookie
to its string representation.
Returns the new Hash formed by adding each header-value pair in self
as a key-value pair in the Hash.
source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" table = CSV.parse(source, headers: true) row = table[0] row.to_h # => {"Name"=>"foo", "Value"=>"0"}
Header order is preserved, but repeated headers are ignored:
source = "Name,Name,Name\nFoo,Bar,Baz\n" table = CSV.parse(source, headers: true) row = table[0] row.to_h # => {"Name"=>"Foo"}
Returns the table as an Array of Arrays; the headers are in the first row:
source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" table = CSV.parse(source, headers: true) table.to_a # => [["Name", "Value"], ["foo", "0"], ["bar", "1"], ["baz", "2"]]
Contains all discovered TupleSpaces except for the primary.
Contains all discovered TupleSpaces except for the primary.
Convert back to the [name, version, platform] tuple
Renders the document back to a string
Renders the given line
Also allows us to represent source code as an array of code lines.
When we have an array of code line elements calling ‘join` on the array will call `to_s` on each element, which essentially converts it back into it’s original source string.