179件ヒット
[1-100件を表示]
(0.148秒)
ライブラリ
- ビルトイン (91)
-
irb
/ cmd / help (11) -
json
/ add / exception (11) -
net
/ http (11) -
rake
/ rdoctask (11)
クラス
-
CGI
:: Cookie (11) - Exception (29)
-
IRB
:: ExtendCommand :: Help (11) - Module (7)
- NameError (11)
-
RDoc
:: Options (11) -
Rake
:: RDocTask (11) -
RubyVM
:: InstructionSequence (22) -
Thread
:: Backtrace :: Location (33) -
WEBrick
:: Cookie (22)
モジュール
-
Net
:: HTTPHeader (11)
検索結果
先頭5件
-
Rake
:: RDocTask # main -> String (18203.0) -
メインとして使用されるファイル名を返します。
メインとして使用されるファイル名を返します。 -
RDoc
:: Options # main _ page -> String | nil (6219.0) -
コマンドライン引数の --main オプションで指定したファイル名、クラス/モ ジュール名を返します。
...コマンドライン引数の --main オプションで指定したファイル名、クラス/モ
ジュール名を返します。
指定しなかった場合は nil を返します。... -
Net
:: HTTPHeader # main _ type -> String|nil (6209.0) -
"text/html" における "text" のようなタイプを表す 文字列を返します。
...タイプを表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.main_type # => "text"
//}... -
CGI
:: Cookie # domain -> String (6202.0) -
クッキーを適用するドメインを返します。
クッキーを適用するドメインを返します。 -
WEBrick
:: Cookie # domain -> String (6202.0) -
ドメイン名を文字列で表すアクセサです。
ドメイン名を文字列で表すアクセサです。
@param value ドメイン名を表す文字列を指定します。 -
WEBrick
:: Cookie # domain=(value) (6102.0) -
ドメイン名を文字列で表すアクセサです。
ドメイン名を文字列で表すアクセサです。
@param value ドメイン名を表す文字列を指定します。 -
Exception
# set _ backtrace(errinfo) -> nil | String | [String] (227.0) -
バックトレース情報に errinfo を設定し、設定されたバックトレース 情報を返します。
...param errinfo 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_backt... -
Exception
# full _ message(highlight: true , order: :bottom) -> String (120.0) -
例外の整形された文字列を返します。
...st):\ntest.rb:2:in `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
$stderr = $stdout
p e.full_message # => "test.rb:2:in `<main>': test (RuntimeError)\n"
$stderr = STDERR
p e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:2:in `<main>': \e[1mtest (\e[4;... -
NameError
# to _ s -> String (114.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... -
RubyVM
:: InstructionSequence # label -> String (114.0) -
self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。
...ラベルを返します。通常、メソッド名、クラス名、
モジュール名などで構成されます。
トップレベルでは "<main>" を返します。self を文字列から作成していた場合
は "<compiled>" を返します。
例1:irb で実行した場合
iseq = Ru......d.rb
def hello
puts "hello, world"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.label # => "<main>"
例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).label
# => "hello"
@se...