種類
- インスタンスメソッド (61)
- ライブラリ (55)
- 文書 (38)
- 特異メソッド (11)
ライブラリ
- ビルトイン (5)
- prettyprint (1)
-
rdoc
/ context (44) -
rexml
/ document (22)
クラス
-
Enumerator
:: Yielder (5) - PrettyPrint (1)
-
RDoc
:: Context (44) -
REXML
:: Element (11) -
REXML
:: XPath (11)
キーワード
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (5) -
each
_ attribute (11) -
each
_ classmodule (11) -
each
_ constant (11) -
each
_ element _ with _ text (11) -
each
_ method (11) - first? (1)
-
net
/ imap (11) - open-uri (11)
- pp (11)
- rss (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11) -
to
_ proc (5) -
webrick
/ cgi (11)
検索結果
先頭5件
- REXML
:: XPath . each(element , path = nil , namespaces = {} , variables = {}) {|e| . . . } -> () - REXML
:: Element # each _ element _ with _ text(text = nil , max = 0 , name = nil) {|element| . . . } -> () - RDoc
:: Context # each _ attribute {|a| . . . } -> [RDoc :: Attr] - RDoc
:: Context # each _ classmodule {|m| . . . } -> [RDoc :: SingleClass | RDoc :: NormalClass | RDoc :: NormalModule] - RDoc
:: Context # each _ constant {|c| . . . } -> [RDoc :: Constant]
-
REXML
:: XPath . each(element , path = nil , namespaces = {} , variables = {}) {|e| . . . } -> () (18213.0) -
element の path で指定した XPath 文字列にマッチする各ノード に対してブロックを呼び出します。
...変数名とその値の対応付け
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:x='1'>
<a>
<b>b1</b>
<x:c />
<b>b2</b>
<d />
</a>
<b> b3 </b>
</root>
EOS
REXML::XPath.each(doc, "/root/a/b"){|e| p e.text }
# >> "b1"
# >> "b2"
//}... -
REXML
:: Element # each _ element _ with _ text(text = nil , max = 0 , name = nil) {|element| . . . } -> () (12469.0) -
テキストを子ノードとして 持つすべての子要素を引数としてブロックを呼び出します。
...テキストを子ノードとして
持つすべての子要素を引数としてブロックを呼び出します。
text を指定すると、テキストの内容が text であるもののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対......)。
@param text テキストの中身(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a><b>b</b><c>b</c><d>d</d><e/></a>'
doc.root.each_element_with_text {|e|p e}
#......>> <b> ... </>
# >> <c> ... </>
# >> <d> ... </>
doc.root.each_element_with_text('b'){|e|p e}
# >> <b> ... </>
# >> <c> ... </>
doc.root.each_element_with_text('b', 1){|e|p e}
# >> <b> ... </>
doc.root.each_element_with_text(nil, 0, 'd'){|e|p e}
# >> <d> ... </>
//}... -
RDoc
:: Context # each _ attribute {|a| . . . } -> [RDoc :: Attr] (9201.0) -
追加された RDoc::Attr に対してブロックを評価します。
追加された RDoc::Attr に対してブロックを評価します。 -
RDoc
:: Context # each _ classmodule {|m| . . . } -> [RDoc :: SingleClass | RDoc :: NormalClass | RDoc :: NormalModule] (9201.0) -
追加されたクラス、モジュールに対してブロックを評価します。
...追加されたクラス、モジュールに対してブロックを評価します。
@see RDoc::Context#classes, RDoc::Context#modules... -
RDoc
:: Context # each _ constant {|c| . . . } -> [RDoc :: Constant] (9201.0) -
追加された RDoc::Constant に対してブロックを評価します。
追加された RDoc::Constant に対してブロックを評価します。 -
RDoc
:: Context # each _ method {|m| . . . } -> [RDoc :: AnyMethod] (9201.0) -
追加されたメソッド(RDoc::AnyMethod かそのサブクラスのオブジェクト) に対してブロックを評価します。
追加されたメソッド(RDoc::AnyMethod かそのサブクラスのオブジェクト)
に対してブロックを評価します。 -
open-uri (6114.0)
-
http/ftp に簡単にアクセスするためのクラスです。 Kernel.#open を再定義します。
...義します。
=== 使用例
http/ftp の URL を、普通のファイルのように開けます。
require 'open-uri'
open("http://www.ruby-lang.org/") {|f|
f.each_line {|line| p line}
}
開いたファイルオブジェクトは StringIO もしくは Tempfile で
すが OpenURI::Me......えます。
require 'open-uri'
open("http://www.ruby-lang.org/en") {|f|
f.each_line {|line| p line}
p f.base_uri # <URI::HTTP:0x40e6ef2 URL:http://www.ruby-lang.org/en/>
p f.content_type # "text/html"
p f.charset # "iso-8859-1"
p f.content_encoding # []......加のヘッダフィールドを指定できます。
require 'open-uri'
open("http://www.ruby-lang.org/en/",
"User-Agent" => "Ruby/#{RUBY_VERSION}",
"From" => "foo@bar.invalid",
"Referer" => "http://www.ruby-lang.org/") {|f|
...
}
http_proxy や ftp_proxy などの環境変......ラスです。
=== 使用例
http/ftp の URL を、普通のファイルのように開けます。
require 'open-uri'
URI.open("http://www.ruby-lang.org/") {|f|
f.each_line {|line| p line}
}
開いたファイルオブジェクトは StringIO もしくは Tempfile で
すが OpenURI......えます。
require 'open-uri'
URI.open("http://www.ruby-lang.org/en") {|f|
f.each_line {|line| p line}
p f.base_uri # <URI::HTTP:0x40e6ef2 URL:http://www.ruby-lang.org/en/>
p f.content_type # "text/html"
p f.charset # "iso-8859-1"
p f.content_encoding......のヘッダフィールドを指定できます。
require 'open-uri'
URI.open("http://www.ruby-lang.org/en/",
"User-Agent" => "Ruby/#{RUBY_VERSION}",
"From" => "foo@bar.invalid",
"Referer" => "http://www.ruby-lang.org/") {|f|
...
}
http_proxy や ftp_proxy などの環境... -
ruby 1
. 6 feature (5388.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...グ修正がメイン
になります。
((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。
== 1.6.8 (2002-12-24) -> stable-snapshot
: 2003-01-22: errno
EAGAIN と EWOULDBLOCK が同じ値の......,'Foo')
=> -:1: [BUG] Segmentation fault
ruby 1.6.7 (2002-03-01) [i586-linux]
=> ruby 1.6.7 (2002-03-15) [i586-linux]
: 2002-03-10 メソッドの戻り値
以下のメソッドの戻り値が正しくなりました。((<ruby-bugs-ja:PR#205>))
* ((<Enumerable/each_with_index>)......1-09-19) [i586-linux]
sub:sub
main:main
sub:sub
main:main
: net/telnet
Net::Telnet が特定のホストへ接続後、動かない事がありました。
((<ruby-list:31303>))
: CGI#header
以下のようなスクリプトでTEXT_PLAINが"text/... -
ruby 1
. 8 . 4 feature (1476.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影響の範囲が小さいと思われる変更もこちら
* [change]: 変更されたクラス/メソッドなど(互換......uby-dev:27331]
const_missingが再定義されていて実行を継続した場合にSEGVする可能性
があったバグの修正。((<ruby-dev:27331>))
: IO [bug]
#Wed Sep 28 08:12:18 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * io.c (read_buffered_data): check if reached......#
# * ext/tk/lib/tk.rb: add Tk.pkgconfig_list and Tk.pkgconfig_get
# [Tk8.5 feature].
#
# * ext/tk/lib/tk/text.rb: supports new indices modifiers on a Text
# widget [Tk8.5 feature].
#
Tcl/Tk8.5a3 への対応のため,Tk.pkgconfig_list および Tk.pkgconfig_get... -
NEWS for Ruby 2
. 7 . 0 (354.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.6.0 以降の変更
=== 言語仕様の変更
==== パターンマッチ
* パターンマ......b #=> 1
p c #=> [2, 3]
end
//}
//emlist[][ruby]{
case {a: 0, b: 1}
in {a: 0, x: 1}
:unreachable
in {a: 0, b: var}
p var #=> 1
end
//}
//emlist[][ruby]{
case -1
in 0 then :unreachable
in 1 then :unreachable
end #=> NoMatchingPatternError
//}
//emlist{
json = <<END
{
"name": "Alice",
"age......15594
* open-uri
* Kernelモジュールでopen-uriのopenメソッドを使うと警告されるようになりました。
代わりにURI.openを使ってください。 15893
* メディアタイプ "text/*" のデフォルトの charset が ISO-8859-1 から UTF-8 に
な...