Results for: "match"

No documentation available

Calls the block with each header-value pair; returns self:

source = "Name,Name,Name\nFoo,Bar,Baz\n"
table = CSV.parse(source, headers: true)
row = table[0]
row.each {|header, value| p [header, value] }

Output:

["Name", "Foo"]
["Name", "Bar"]
["Name", "Baz"]

If no block is given, returns a new Enumerator:

row.each # => #<Enumerator: #<CSV::Row "Name":"Foo" "Name":"Bar" "Name":"Baz">:each>

Calls the block with each row or column; returns self.

When the access mode is :row or :col_or_row, calls the block with each CSV::Row object:

source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
table = CSV.parse(source, headers: true)
table.by_row! # => #<CSV::Table mode:row row_count:4>
table.each {|row| p row }

Output:

#<CSV::Row "Name":"foo" "Value":"0">
#<CSV::Row "Name":"bar" "Value":"1">
#<CSV::Row "Name":"baz" "Value":"2">

When the access mode is :col, calls the block with each column as a 2-element array containing the header and an Array of column fields:

table.by_col! # => #<CSV::Table mode:col row_count:4>
table.each {|column_data| p column_data }

Output:

["Name", ["foo", "bar", "baz"]]
["Value", ["0", "1", "2"]]

Returns a new Enumerator if no block is given:

table.each # => #<Enumerator: #<CSV::Table mode:col row_count:4>:each>
No documentation available
No documentation available
No documentation available

Returns the path from an FTP URI.

RFC 1738 specifically states that the path for an FTP URI does not include the / which separates the URI path from the URI host. Example:

ftp://ftp.example.com/pub/ruby

The above URI indicates that the client should connect to ftp.example.com then cd to pub/ruby from the initial login directory.

If you want to cd to an absolute directory, you must include an escaped / (%2F) in the path. Example:

ftp://ftp.example.com/%2Fpub/ruby

This method will then return “/pub/ruby”.

No documentation available

Produces the summary text. Each line of the summary is yielded to the block (without newline).

sdone

Already summarized short style options keyed hash.

ldone

Already summarized long style options keyed hash.

width

Width of left side (option part). In other words, the right side (description part) starts after width columns.

max

Maximum width of left side -> the options are filled within max columns.

indent

Prefix string indents all summarized lines.

Searches key in id list. The result is returned or yielded if a block is given. If it isn’t found, nil is returned.

Creates the summary table, passing each line to the block (without newline). The arguments args are passed along to the summarize method which is called on every option.

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
Search took: 5ms  ·  Total Results: 1813