188件ヒット
[1-100件を表示]
(0.170秒)
ライブラリ
- ビルトイン (104)
-
irb
/ cmd / help (12) -
json
/ add / exception (12) -
net
/ http (12) -
rake
/ rdoctask (12)
クラス
-
CGI
:: Cookie (12) - Exception (32)
-
IRB
:: ExtendCommand :: Help (12) - Module (12)
- NameError (12)
-
RDoc
:: Options (12) -
Rake
:: RDocTask (12) -
RubyVM
:: InstructionSequence (24) -
Thread
:: Backtrace :: Location (36) -
WEBrick
:: Cookie (12)
モジュール
-
Net
:: HTTPHeader (12)
検索結果
先頭5件
-
Rake
:: RDocTask # main -> String (21303.0) -
メインとして使用されるファイル名を返します。
メインとして使用されるファイル名を返します。 -
Net
:: HTTPHeader # main _ type -> String|nil (12309.0) -
"text/html" における "text" のようなタイプを表す 文字列を返します。
..."text/html" における "text" のようなタイプを表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_r......esponse(uri)
res.main_type # => "text"
//}... -
RDoc
:: Options # main _ page -> String | nil (9319.0) -
コマンドライン引数の --main オプションで指定したファイル名、クラス/モ ジュール名を返します。
...コマンドライン引数の --main オプションで指定したファイル名、クラス/モ
ジュール名を返します。
指定しなかった場合は nil を返します。... -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (9131.0) -
RI から Ruby のドキュメントを参照します。
...RI から Ruby のドキュメントを参照します。
irb(main):001:0> help String#match
...
@param names 参照したいクラス名やメソッド名などを文字列で指定します。
names を指定しなかった場合は、RI を対話的なモードで起動します。メソ......main):001:0> help
Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.
>> String#match
String#match
(from ruby core)
------------------------------------------------------------------------------
str.match(pattern) -> mat......chdata or nil
str.match(pattern, pos) -> matchdata or nil
...... -
Exception
# set _ backtrace(errinfo) -> nil | String | [String] (6327.0) -
バックトレース情報に errinfo を設定し、設定されたバックトレース 情報を返します。
...nfo nil、String あるいは String の配列のいずれかを指定します。
//emlist[例][ruby]{
begin
begin
raise "inner"
rescue
raise "outer"
end
rescue
$!.backtrace # => ["/path/to/test.rb:5:in `rescue in <main>'", "/path/to/test.rb:2:in `<main>'"]
$!.set_backtrace(["dum......my1", "dummy2"])
$!.backtrace # => ["dummy1", "dummy2"]
end
//}... -
CGI
:: Cookie # domain -> String (6302.0) -
クッキーを適用するドメインを返します。
クッキーを適用するドメインを返します。 -
WEBrick
:: Cookie # domain -> String (6302.0) -
ドメイン名を文字列で表すアクセサです。
ドメイン名を文字列で表すアクセサです。
@param value ドメイン名を表す文字列を指定します。 -
NameError
# to _ s -> String (6214.0) -
例外オブジェクトを文字列に変換して返します。
...オブジェクトを文字列に変換して返します。
例:
begin
foobar
rescue NameError => err
p err # => #<NameError: undefined local variable or method `foobar' for main:Object>
p err.to_s # => "undefined local variable or method `foobar' for main:Object"
end... -
Exception
# to _ json(*args) -> String (6208.0) -
自身を JSON 形式の文字列に変換して返します。
...してから JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。
@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json に渡されます。
//emlist[例][ruby]{
require "json/add/core"
begin
0/0
rescue => e
e.to_json # => "{\"json_class\......":\"ZeroDivisionError\",\"m\":\"divided by 0\",\"b\":[\"/path/to/test.rb:4:in `/'\",\"/path/to/test.rb:4:in `<main>'\"]}"
end
//}
@see JSON::Generator::GeneratorMethods::Hash#to_json...