るりまサーチ

最速Rubyリファレンスマニュアル検索!
176件ヒット [101-176件を表示] (0.065秒)
トップページ > クエリ:l[x] > クエリ:content=[x]

別のキーワード

  1. kernel $-l
  2. _builtin $-l
  3. matrix l
  4. lupdecomposition l
  5. l matrix

検索結果

<< < 1 2 >>

CSV.filter(input, output, options = Hash.new) {|row| ... } (6106.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...のデフォルト値は $/ です。

//emlist[例: input, output は初期値][ruby]{
# $ echo "header1,header2\nrow1_1,row1_2" > in.csv; ruby test.rb in.csv

require "csv"

options = { headers: true, return_headers: true, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?...
...//emlist[例: input, output を指定する][ruby]{
require "csv"
content =
<<EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
options = { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.o...
...pen("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row << row["first name"] + " " + row["last name"]
end

# out.csv の内容
# => id,first name,last name,age,full name
# 1,taro,tanaka,20,taro tanaka
# 2,jiro,suzuki,18,jir...

CSV.filter(options = Hash.new) {|row| ... } (6106.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...のデフォルト値は $/ です。

//emlist[例: input, output は初期値][ruby]{
# $ echo "header1,header2\nrow1_1,row1_2" > in.csv; ruby test.rb in.csv

require "csv"

options = { headers: true, return_headers: true, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?...
...//emlist[例: input, output を指定する][ruby]{
require "csv"
content =
<<EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
options = { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.o...
...pen("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row << row["first name"] + " " + row["last name"]
end

# out.csv の内容
# => id,first name,last name,age,full name
# 1,taro,tanaka,20,taro tanaka
# 2,jiro,suzuki,18,jir...

REXML::Instruction.new(target, content = nil) -> REXML::Instruction (3101.0)

新たな Instruction オブジェクトを生成します。

新たな Instruction オブジェクトを生成します。

@param target ターゲット
@param content 内容

RSS::Rss::Channel::Item::Category#content (3001.0)

@todo

@todo

RSS::Rss::Channel::Item::Source#content (3001.0)

@todo

@todo

絞り込み条件を変える

RSS::TrackBackModel20::TrackBackAbout#content (3001.0)

@todo

@todo

RSS::TrackBackModel20::TrackBackPing#content (3001.0)

@todo

@todo
<< < 1 2 >>