るりまサーチ

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

別のキーワード

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

ライブラリ

キーワード

検索結果

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

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

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

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

REXML::Instruction#target -> String (24213.0)

XML 処理命令のターゲットを返します。

...quire 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content # => "type=\"text/css\" href=\"style.css\""
//}...

Resolv::DNS::Resource::IN::SRV.new(priority, weight, port, target) -> Resolv::DNS::Resource::IN::SRV (18508.0)

Resolv::DNS::Resource::IN::SRV のインスタンスを生成します。

...Resolv::DNS::Resource::IN::SRV のインスタンスを生成します。

@param priority ホストの優先順位
@param weight
@param port ポート番号
@param target ホスト名...

NEWS for Ruby 2.5.0 (6150.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...NEWS for Ruby 2.5.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...非推奨になりました。C拡張のベースクラスでしたが、Rubyレベルに公開するのをやめました。3072

* Exception
* Exception#full_message を追加 14141 [実験的]
例外の文字列表現を取得します。その文字列は捕捉されない例外をRu...
...きるようになりました 11286

* File
* File.open :newline オプションを指定するとテキストモードになります 13350
* File#path はFile::Constants::TMPFILE付きで開いたファイルに対して IOError を発生させます
13568
* File.stat, File.ex...

REXML::Instruction#content -> String | nil (6118.0)

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

...::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<?foobar?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content # => "type=\"text/css\" href=\"style.css\""
doc[4].target # => "foobar"...
...doc[4].content # => nil
//}...

絞り込み条件を変える

yaml (72.0)

構造化されたデータを表現するフォーマットであるYAML (YAML Ain't Markup Language) を扱うためのライブラリです。

...> true
//}

//emlist[例2: 構造化されたハッシュ][ruby]{
require 'yaml'
require 'date'

str_l = <<~YAML_EOT
Tanaka Taro: {age: 35, birthday: 1970-01-01}
Suzuki Suneo: {
age: 13,
birthday: 1992-12-21
}
YAML_EOT

str_r = {}
str_r["Tanaka Taro"] = {
"age" => 35,
"birthday" =>...
...Date.new(1970, 1, 1)
}
str_r["Suzuki Suneo"] = {
"age" => 13,
"birthday" => Date.new(1992, 12, 21)
}

p str_r == YAML.load(str_l) # => true
//}

//emlist[例3: 構造化されたログ][ruby]{
require 'yaml'
require 'stringio'

strio_r = StringIO.new(<<~YAML_EOT)
---
time: 2008-02-25 17:03...
...12 +09:00
target
: YAML
version: 4
log: |
例を加えた。
アブストラクトを修正した。
---
time: 2008-02-24 17:00:35 +09:00
target
: YAML
version: 3
log: |
アブストラクトを書いた。

YAML_EOT

YAML.load_stream(strio_r).sort_by{ |a| a["version"] }.ea...

CSV (66.0)

このクラスは CSV ファイルやデータに対する完全なインターフェイスを提供します。

...CSV_TEXT
Ruby,1995
Rust,2010
CSV_TEXT

IO
.write "sample.csv", csv_text

# ファイルから一行ずつ
CSV.foreach("sample.csv") do |row|
p row
end
# => ["Ruby", "1995"]
# ["Rust", "2010"]

# ファイルから一度に
p CSV.read("sample.csv")
# => [["Ruby", "1995"], ["Rust", "2010"]]

#...
...<< %w{my data here} } # to $stderr
//}

=== CSV と文字エンコーディング (M17n or Multilingualization)

This new CSV parser is m17n savvy. The parser works in the Encoding of the IO
or String object being read from or written to. Your data is never transcoded
(unless you ask Ruby to tran...
...example, <tt>:col_sep</tt>, <tt>:row_sep</tt>, and
<tt>:quote_char</tt> must be transcoded to match your data. Hopefully this
makes the entire process feel transparent, since CSV's defaults should just
magically work for you data. However, you can set these values manually in
the target Encoding t...