252件ヒット
[201-252件を表示]
(0.072秒)
検索結果
先頭5件
-
CSV
:: Table # by _ row! -> self (3058.0) -
自身をロウモードに変更します。
...@return 必ず自身を返すので安全にメソッドチェーンできます。
//emlist[例][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table = CSV::Table.new([row1, row2])
table......# => #<CSV::Table mode:col_or_row row_count:3>
table.by_row!
table # => #<CSV::Table mode:row row_count:3>
table[0] # => #<CSV::Row "header1":"row1_1" "header2":"row1_2">
table[1] # => #<CSV::Row "header1":"row2_1" "header2":"row2_2">
//}... -
CSV
:: Table # <<(row _ or _ array) -> self (3046.0) -
自身の最後に新しい行を追加します。
...rray CSV::Row のインスタンスか配列を指定します。
配列を指定した場合は CSV::Row に変換されます。
@return メソッドチェーンのために自身を返します。
//emlist[例][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"]......, ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table = CSV::Table.new([row1])
table << row2
table.to_a # => [["header1", "header2"], ["row1_1", "row1_2"], ["row2_1", "row2_2"]]
//}... -
CSV
:: Table # by _ col! -> self (3034.0) -
自身をカラムモードに変更します。
...@return 必ず自身を返すので安全にメソッドチェーンできます。
//emlist[例][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table = CSV::Table.new([row1, row2])
table.by......_col!
table[0] # => ["row1_1", "row2_1"]
table[1] # => ["row1_2", "row2_2"]
//}... -
CSV
:: Table # by _ col _ or _ row! -> self (3034.0) -
自身をミックスモードに変更します。
...return 必ず自身を返すので安全にメソッドチェーンできます。
//emlist[例][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table = CSV::Table.new([row1, row2]).by_col!
tab......le # => #<CSV::Table mode:col row_count:3>
table.by_col_or_row!
table # => #<CSV::Table mode:col_or_row row_count:3>
//}... -
CSV
:: Table # mode -> Symbol (3022.0) -
現在のアクセスモードを返します。
...現在のアクセスモードを返します。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
table = CSV::Table.new([row])
table.mode # => :col_or_row
table.by_col!
table.mode # => :col
//}...