るりまサーチ

最速Rubyリファレンスマニュアル検索!
1165件ヒット [1101-1165件を表示] (0.076秒)

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

ライブラリ

クラス

キーワード

検索結果

<< < ... 10 11 12 >>

CSV#quote_char -> String (13.0)

フィールドをクオートするのに使用する文字列を返します。

...フィールドをクオートするのに使用する文字列を返します。

//emlist[例][ruby]{
require
"csv"

csv = CSV.new("header1,header2\nrow1_1,row1_2", quote_char: "'")
csv.quote_char # => "'"
//}

@see CSV.new...

CSV#rewind -> 0 (13.0)

IO#rewind に似ています。CSV#lineno を 0 にします。

...IO#rewind に似ています。CSV#lineno を 0 にします。

//emlist[例][ruby]{
require
"csv"

csv = CSV.new("header1,header2\nrow1_1,row1_2")
csv.lineno # => 0
csv.readline
csv.lineno # => 1
csv.rewind
csv.lineno # => 0
//}

@see IO#rewind...

CSV::FieldInfo#header -> String | nil (13.0)

利用可能な場合はヘッダを表す文字列を返します。

...を返します。

//emlist[例][ruby]{
require
'csv'

csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", headers: true)
csv.convert do |field,field_info|
p field_info.header
Date.parse(field)
end
p csv.first

# => "date1"
# => "date2"
# => #<CSV::Row "date1":#<Date: 2018-07-09 ((2458309j,0s,0...

CSV::FieldInfo#index -> Integer (13.0)

行内で何番目のフィールドかわかるゼロベースのインデックスを返します。

...クスを返します。

//emlist[例][ruby]{
require
'csv'

csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", headers: true)
csv.convert do |field,field_info|
p field_info.index
Date.parse(field)
end
p csv.first

# => 0
# => 1
# => #<CSV::Row "date1":#<Date: 2018-07-09 ((2458309j,0s,0n),+0s,...

CSV::FieldInfo#line -> Integer (13.0)

行番号を返します。

...

//emlist[例][ruby]{
require
'csv'

csv = CSV.new("date1,date2,date3\n2018-07-09,2018-07-10\n2018-08-09,2018-08-10", headers: true)
csv.convert do |field,field_info|
p field_info.line
Date.parse(field)
end
p csv.to_a

# => 2
# => 2
# => 3
# => 3
# => [#<CSV::Row "date1":#<Date: 2018-07-09 (...

絞り込み条件を変える

Vector#covector -> Matrix (13.0)

Matrix オブジェクトへ変換します。

...トへ変換します。

列ベクトル (行列)、すなわち、(n, 1) 型の行列に変換します。
実際には Matrix.row_vector(self) を適用します。

//emlist[例][ruby]{
require
'matrix'

v = Vector[2, 3, 5]
p v # => Vector[2, 3, 5]
m = v.covector
p m # => Matrix[[2, 3, 5]]
//}...
<< < ... 10 11 12 >>