るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

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

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

...][ruby]{
require '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.c...

REXML::Instruction (6012.0)

XML 処理命令(XML Processing Instruction, XML PI)を表すクラス。

...令(XML Processing Instruction, XML PI)を表すクラス。

XML 処理命令 とは XML 文書中の <? と ?> で挟まれた部分のことで、
アプリケーションへの指示を保持するために使われます。

XML 宣言(文書先頭の <?xml version=... ?>)はXML処理命令で...
...][ruby]{
require '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.c...

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

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

...nt.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].c...

CSV (90.0)

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

...ターフェイスを提供します。

=== 読み込み

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

csv_text = <<~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", "2...
...17n 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 transcode it for you) and will literally be parsed in
the Encoding it is in. Thus CSV wi...
...values manually in
the target Encoding to avoid the translation.

It's also important to note that while all of CSV's core parser is now
Encoding
agnostic, some features are not. For example, the built-in
converters will try to transcode data to UTF-8 before making conversions.
Again, you can prov...

yaml (48.0)

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

...re '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: |
アブ...
....load_stream(strio_r).sort_by{ |a| a["version"] }.each do |obj|
puts "version %d\ntime %s\ntarget:%s\n%s\n" % obj.values_at("version", "time", "target", "log")
end

# =>
# version 3
# time 2008-02-24 17:00:35 +0900
# target:YAML
# アブストラクトを書いた。
#
# version 4
# time 200...
...
* !ruby/struct: Struct オブジェクト
* !ruby/sym(もしくは !ruby/symbol): Symbol オブジェクト
* !ruby/encoding: Encoding オブジェクト
* !ruby/exception: 例外オブジェクト
* !ruby/object:<クラス名>: 上記以外のオブジェクト

//emlist[例][ruby]{
requir...

絞り込み条件を変える