153件ヒット
[1-100件を表示]
(0.067秒)
種類
- インスタンスメソッド (77)
- 文書 (51)
- 特異メソッド (25)
クラス
-
Net
:: HTTPResponse (33) - OptionParser (22)
-
OptionParser
:: ParseError (22)
モジュール
- Psych (25)
キーワード
-
NEWS for Ruby 2
. 5 . 0 (7) - load (14)
- msg (11)
-
on
_ tail (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) - separator (11)
-
to
_ s (11) - value (11)
- 制御構造 (11)
検索結果
先頭5件
-
OptionParser
:: ParseError # message -> String (24201.0) -
標準エラーに出力するメッセージを返します。
標準エラーに出力するメッセージを返します。
@return 文字列を返します。 -
Psych
. parse(yaml , filename = nil) -> Psych :: Nodes :: Document (18219.0) -
YAML ドキュメントをパースし、YAML の AST を返します。
...生します
@see Psych.load
//emlist[例][ruby]{
Psych.parse("---\n - a\n - b") # => #<Psych::Nodes::Document:...>
begin
Psych.parse("--- `", "file.txt")
rescue Psych::SyntaxError => ex
p ex.file # => 'file.txt'
p ex.message # => "(file.txt): found character that cannot start any token w... -
Net
:: HTTPResponse # message -> String (18213.0) -
HTTP サーバがリザルトコードに付加して返すメッセージです。 例えば 'Not Found' などです。
...して返すメッセージです。
例えば 'Not Found' などです。
msg は obsolete です。使わないでください。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.message # => "OK"
//}... -
OptionParser
:: ParseError # to _ s -> String (9101.0) -
標準エラーに出力するメッセージを返します。
標準エラーに出力するメッセージを返します。
@return 文字列を返します。 -
Net
:: HTTPResponse # msg -> String (3113.0) -
HTTP サーバがリザルトコードに付加して返すメッセージです。 例えば 'Not Found' などです。
...して返すメッセージです。
例えば 'Not Found' などです。
msg は obsolete です。使わないでください。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.message # => "OK"
//}... -
OptionParser
# on _ tail(*arg , &block) -> self (3106.0) -
オプションを取り扱うためのブロックを自身の持つリストの最後に登録します。
...param arg OptionParser#on と同様です。
@param block OptionParser#on と同様です。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
puts opts.help
# => Usage: test [o......, --help
//}
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end
opts.on_tail("--version", "Show version") do
puts OptionParser::Version.join('.')
exit
end
//}
@see OptionParser#on, OptionParser#on_head... -
OptionParser
# separator(sep) -> () (3106.0) -
サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。
...でこのメソッドを呼びます。
@param sep サマリの区切りを文字列で指定します。
//emlist[][ruby]{
require 'optparse'
opts = OptionParser.new
opts.banner = "Usage: example.rb [options]"
opts.separator ""
opts.separator "Specific options:"
opts.on("-r", "--require LIBRARY......") do |lib|
options.library << lib
end
opts.separator ""
opts.separator "Common options:"
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end
//}... -
ruby 1
. 8 . 4 feature (474.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...e/Ruby本体>))
* ((<ruby 1.8.4 feature/Symbol [bug]>))
* ((<ruby 1.8.4 feature/Symbol [bug]>))
* ((<ruby 1.8.4 feature/super [bug]>))
* ((<ruby 1.8.4 feature/正規表現 [bug]>))
* ((<ruby 1.8.4 feature/シグナル [bug]>))
* ((<ruby 1.8.4 feature/組み込みライブラリ>))
* ((<r......IO [bug]>))
* ((<ruby 1.8.4 feature/添付ライブラリ>))
* ((<ruby 1.8.4 feature/"Ruby/Tk">))
* ((<ruby 1.8.4 feature/REXML [compat]>))
* ((<ruby 1.8.4 feature/TCPSocket#initialize [bug]>))
* ((<ruby 1.8.4 feature/TCPServer#initialize [bug]>))
* ((<ruby 1.8.4 feature/"optparse">))
*......定できる。((<ruby-dev:27408>))
== プラットフォーム固有
: bccwin32 [bug]
#Mon Nov 28 13:08:54 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
#
# * win32/win32.c (rb_w32_strerror): remove all CR and LF. (avoid broken
# error message on bccwin32 + winsock)
bccwin3... -
ruby 1
. 6 feature (126.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 が同じ値のシステムで、EWOUL......ントの扱いなどは、1.7
とは異なります。(((<ruby 1.7 feature>)) の 2002-06-24 も参照)
p "#{ "" # comment }"
=> ruby 1.6.8 (2002-10-04) [i586-linux]
""
=> -:1: parse error
ruby 1.7.3 (2002-10-04) [i586-linux]
: SizedQueue#deq, #shi......ry]>)) を指定したときにスクリ
プトを実行せずに終了することがありました。((<ruby-dev:13752>))
: attr_*
アクセサに余計な引数を渡してもエラーになりませんでした。
((<ruby-dev:13748>))
class C
def initialize
@message =... -
Net
:: HTTPResponse # value -> nil (118.0) -
レスポンスが 2xx(成功)でなかった場合に、対応する 例外を発生させます。
...I.parse(uri))
response.value # => nil
//}
//emlist[例 レスポンスが 2xx以外][ruby]{
require 'net/http'
uri = "http://www.example.com/invalid.html"
response = Net::HTTP.get_response(URI.parse(uri))
begin
response.value
rescue => e
e.class # => Net::HTTPServerException
e.message # => 4...