るりまサーチ

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

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io each_line
  5. io readlines

ライブラリ

クラス

キーワード

検索結果

REXML::Instruction#content=(value) (21100.0)

XML 処理命令の内容を変更します。

XML 処理命令の内容を変更します。

@param value 新たなデータ(文字列)

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

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

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

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

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

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

...ます。

@param input String か IO のインスタンスを指定します。
デフォルトは ARGF です。

@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。

@param options ":in_", ":input_" で始まるキ...
...期値][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?
row << "header3"
next
end
row << "row1_3"
end

# => header1,hea...
...re "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.open("test.csv"), File.open("out.csv", "w"), options) do |...

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

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

...ます。

@param input String か IO のインスタンスを指定します。
デフォルトは ARGF です。

@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。

@param options ":in_", ":input_" で始まるキ...
...期値][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?
row << "header3"
next
end
row << "row1_3"
end

# => header1,hea...
...re "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.open("test.csv"), File.open("out.csv", "w"), options) do |...

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

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

...ます。

@param input String か IO のインスタンスを指定します。
デフォルトは ARGF です。

@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。

@param options ":in_", ":input_" で始まるキ...
...期値][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?
row << "header3"
next
end
row << "row1_3"
end

# => header1,hea...
...re "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.open("test.csv"), File.open("out.csv", "w"), options) do |...

絞り込み条件を変える

rss (12.0)

RSS を扱うためのライブラリです。

...参考

* RSS 0.91 http://backend.userland.com/rss091
* RSS 1.0 http://purl.org/rss/1.0/spec
* RSS 2.0 http://www.rssboard.org/rss-specification
* Atom 1.0 https://www.ietf.org/rfc/rfc4287.txt

=== 注意

RSS ParserはRSS 0.9x/1.0/2.0, Atom 1.0 をサポートしていますが,RSS 0.90...
...ュールはそれぞれ、
* Dublin Core モジュール http://web.resource.org/rss/1.0/modules/dc/
* Syndication モジュール http://web.resource.org/rss/1.0/modules/syndication/
* Content モジュール http://web.resource.org/rss/1.0/modules/content/
* Trackback モジュール http://...
...
contentメソッドやその別名であるvalueメソッドを利
用します.「要素の内容を表す文字列」を設定するには
content=
メソッドやその別名であるvalue=メソッドを
利用します.

rss.channel.dc_title # => 「要素の内容を表す文字列...