1589件ヒット
[1501-1589件を表示]
(0.139秒)
ライブラリ
- ビルトイン (48)
-
cgi
/ core (12) - csv (84)
-
minitest
/ unit (1) -
net
/ ftp (48) - open-uri (92)
- psych (24)
-
rexml
/ document (48) -
rexml
/ parsers / pullparser (12) -
rexml
/ parsers / sax2parser (12) -
rexml
/ parsers / streamparser (12) -
rexml
/ parsers / ultralightparser (12) -
rubygems
/ package / tar _ input (12) -
rubygems
/ remote _ fetcher (12) - stringio (1004)
クラス
- CSV (84)
- Enumerator (24)
-
Gem
:: Package :: TarInput (12) -
Gem
:: RemoteFetcher (12) -
Net
:: FTP (48) -
REXML
:: Document (12) -
REXML
:: Parsers :: PullParser (12) -
REXML
:: Parsers :: SAX2Parser (12) -
REXML
:: Parsers :: StreamParser (12) -
REXML
:: Parsers :: UltraLightParser (12) - StringIO (992)
モジュール
-
CGI
:: QueryExtension (12) - Enumerable (24)
- Kernel (16)
-
MiniTest
:: Assertions (1) - OpenURI (24)
-
OpenURI
:: OpenRead (24) - Psych (24)
- URI (16)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (12)
- Default (12)
- Meta (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - Pretty (12)
- StringIO (12)
- Transitive (12)
- binmode (12)
- bytes (14)
-
capture
_ io (1) - cgi (12)
- chars (14)
- close (12)
-
close
_ read (12) -
close
_ write (12) - closed? (12)
-
closed
_ read? (12) -
closed
_ write? (12) - codepoints (14)
-
create
_ body (12) - dump (24)
- each (24)
-
each
_ byte (24) -
each
_ char (24) -
each
_ codepoint (24) -
each
_ line (24) -
each
_ with _ index (24) - eof (12)
- eof? (12)
-
external
_ encoding (12) - fcntl (12)
- fileno (12)
- flush (12)
- fsync (12)
- getbyte (12)
- getc (12)
- gets (12)
- inspect (12)
-
internal
_ encoding (12) - isatty (12)
- length (12)
- lineno (12)
- lineno= (12)
- lines (14)
- new (72)
- open (128)
- open-uri (12)
-
open
_ uri (24) -
open
_ uri _ or _ path (12) -
parse
_ stream (12) - pid (12)
- pos (12)
- pos= (12)
- print (24)
- printf (12)
- putc (12)
- puts (12)
- read (36)
-
read
_ nonblock (12) - readbyte (12)
- readchar (12)
- readline (12)
- readlines (12)
- readpartial (36)
- reopen (24)
- rewind (12)
-
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 9 feature (12) - seek (12)
-
set
_ encoding (36) - size (12)
- storbinary (24)
- storlines (24)
- string (24)
- string= (12)
- sync (12)
- sync= (12)
- sysread (36)
- syswrite (12)
- tell (12)
- truncate (12)
- tty? (12)
- ungetbyte (12)
- ungetc (12)
-
with
_ index (24) - write (12)
-
write
_ nonblock (12) - yaml (12)
-
zipped
_ stream (12)
検索結果
先頭5件
-
REXML
:: Document . parse _ stream(source , listener) -> () (3106.0) -
XML文書を source から読み込み、パースした結果を listener にコールバックで伝えます。
...果を
listener にコールバックで伝えます。
このメソッドは
Parsers::StreamParser.new( source, listener ).parse
と同じ挙動をします。
コールバックの詳しい仕組みなどについては REXML::Parsers::StreamParser
および REXML::StreamListener を参照し......てください。
@param source 入力(文字列、IO、IO互換オブジェクト(StringIOなど))
@param listener コールバックオブジェクト... -
MiniTest
:: Assertions # capture _ io { . . . } -> Array (3016.0) -
与えられたブロックを評価中の標準出力と標準エラー出力を StringIO に 変更します。
...与えられたブロックを評価中の標準出力と標準エラー出力を StringIO に
変更します。
@return ブロック評価中に出力された文字列を標準出力を第一要素、標準エラー出力を第二要素とした
配列にして返します。... -
OpenURI
:: Meta (3016.0) -
サーバから取得したデータの属性を扱うために使われるモジュールです。 データを表す文字列や StringIO が extend します。
...サーバから取得したデータの属性を扱うために使われるモジュールです。
データを表す文字列や StringIO が extend します。... -
Psych
. dump(o , io , options = {}) -> () (154.0) -
Ruby のオブジェクト o を YAML ドキュメントに変換します。
...ントが文字列としてメソッドの返り値と
なります。
options で出力に関するオプションを以下の指定できます。
: :version
YAML document に付加するバージョンを [major, minor] という配列、
もしくは文字列で指定します
: :header......けるかどうかを真偽値で指定します
: :indentation
インデントのレベルを 1 から 9 までの整数で指定します
: :canonical
出力の style が canonical であるかどうかを真偽値で指定します
: :line_width
「好ましい」行幅を整数値で指定......@param options 出力オプション
//emlist[例][ruby]{
# Dump an array, get back a YAML string
Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"
# Dump an array to an IO object
Psych.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>
# Dump an array with indentation set
Psych.dump... -
Psych
. dump(o , options = {}) -> String (154.0) -
Ruby のオブジェクト o を YAML ドキュメントに変換します。
...ントが文字列としてメソッドの返り値と
なります。
options で出力に関するオプションを以下の指定できます。
: :version
YAML document に付加するバージョンを [major, minor] という配列、
もしくは文字列で指定します
: :header......けるかどうかを真偽値で指定します
: :indentation
インデントのレベルを 1 から 9 までの整数で指定します
: :canonical
出力の style が canonical であるかどうかを真偽値で指定します
: :line_width
「好ましい」行幅を整数値で指定......@param options 出力オプション
//emlist[例][ruby]{
# Dump an array, get back a YAML string
Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"
# Dump an array to an IO object
Psych.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>
# Dump an array with indentation set
Psych.dump... -
REXML
:: Formatters :: Default (90.0) -
XMLドキュメントを(文字列として)出力するクラスです。
...ent'
require 'rexml/formatters/default'
doc = REXML::Document.new <<EOS
<root>
<children>
<grandchildren/>
</children>
</root>
EOS
default_formatter = REXML::Formatters::Default.new
output = StringIO.new
default_formatter.write(doc, output)
output.string
# => "<root>\n<children>\n <grandchildren....../>\n</children>\n</root>\n"
output = StringIO.new
default_formatter.write(REXML::XPath.first(doc, "/root/children"), output)
output.string
# => "<children>\n <grandchildren/>\n</children>"
ie_hack_formatter = REXML::Formatters::Default.new(true)
output = StringIO.new
ie_hack_formatter.write(doc,......output)
output.string
# => "<root>\n<children>\n <grandchildren />\n</children>\n</root>\n"
//}... -
REXML
:: Formatters :: Pretty (30.0) -
XMLドキュメントを(文字列として)見た目良く出力するクラスです。
...nt'
require 'rexml/formatters/pretty'
doc = REXML::Document.new <<EOS
<root>
<children>
<grandchildren foo='bar'/>
</children>
</root>
EOS
pretty_formatter = REXML::Formatters::Pretty.new
output = StringIO.new
pretty_formatter.write(doc, output)
output.string
# => "<root>\n <children>\n <gran......dchildren foo='bar'/>\n </children>\n</root>"
# この出力結果は入力のXMLよりも空白が増えている
//}... -
yaml (30.0)
-
構造化されたデータを表現するフォーマットであるYAML (YAML Ain't Markup Language) を扱うためのライブラリです。
...るYAML (YAML Ain't Markup Language) を扱うためのライブラリです。
//emlist[例1: 構造化された配列][ruby]{
require 'yaml'
data = ["Taro san", "Jiro san", "Saburo san"]
str_r = YAML.dump(data)
str_l = <<~YAML_EOT
---
- Taro san
- Jiro san
- Saburo san
YAML_EOT
p str_r......<<~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)......quire '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: |
ア... -
cgi (24.0)
-
CGI プログラムの支援ライブラリです。
...i-v11-03
* 3875: The Common Gateway Interface (CGI) Version 1.1
* https://www.w3.org/CGI/
=== 使用例
==== フォームフィールドの値を得る
//emlist[][ruby]{
require "cgi"
cgi = CGI.new
values = cgi['field_name'] # <== 'field_name' の配列
# 'field_name' が指定されてい......なかったら、 ""を返す。
fields = cgi.keys # <== field nameの配列
# フォームに 'field_name' というfield nameがあるときに真
cgi.has_key?('field_name')
cgi.include?('field_name')
//}
==== フォームフィールドの値をハッシュとして得る
フォー......ドの値を取得する(ファイル送信)
//emlist[][ruby]{
require "cgi"
cgi = CGI.new
value = cgi.params['field_name'][0] # TempFile オブジェクト(10240バイト未満の場合は StringIOオブジェクト)
value.read # 本文(送られてきたフ...