ライブラリ
- ビルトイン (10)
- bigdecimal (1)
-
net
/ http (1) -
rake
/ rdoctask (1) - rss (4)
クラス
- BigDecimal (1)
- Bignum (1)
-
CGI
:: Cookie (2) - Integer (1)
- Module (1)
- NoMethodError (1)
-
RDoc
:: Options (2) -
RSS
:: Maker :: ChannelBase :: CategoriesBase :: CategoryBase (2) -
RSS
:: Rss :: Channel :: Item :: Category (2) -
Rake
:: RDocTask (1) - Thread (3)
-
Thread
:: Backtrace :: Location (3) -
WEBrick
:: Cookie (1)
モジュール
-
Net
:: HTTPHeader (1)
キーワード
- args (1)
-
backtrace
_ locations (2) -
base
_ label (1) - domain (4)
- domain= (3)
- inspect (1)
-
main
_ page (1) -
main
_ page= (1) -
main
_ type (1) - raise (1)
- remainder (3)
-
to
_ s (1) - using (1)
検索結果
先頭5件
-
Rake
:: RDocTask # main -> String (63607.0) -
メインとして使用されるファイル名を返します。
メインとして使用されるファイル名を返します。 -
BigDecimal
# remainder(n) -> BigDecimal (55204.0) -
self を n で割った余りを返します。
self を n で割った余りを返します。
@param n self を割る数を指定します。
//emlist[][ruby]{
require 'bigdecimal'
x = BigDecimal((2**100).to_s)
x.remainder(3).to_i # => 1
(-x).remainder(3).to_i # => -1
x.remainder(-3).to_i # => 1
(-x).remainder(-3).to_i # => -1
//}
戻り値は self と同じ符号になります。これは BigDecimal#% とは異な
る点に注意し... -
RSS
:: Maker :: ChannelBase :: CategoriesBase :: CategoryBase # domain (54604.0) -
@todo
@todo -
RSS
:: Maker :: ChannelBase :: CategoriesBase :: CategoryBase # domain=() (54604.0) -
@todo
@todo -
Bignum
# remainder(other) -> Fixnum | Bignum | Float (45904.0) -
self を other で割った余り r を返します。
self を other で割った余り r を返します。
r の符号は self と同じになります。
@param other self を割る数。
@see Bignum#divmod, Bignum#modulo, Numeric#modulo -
CGI
:: Cookie # domain -> String (45904.0) -
クッキーを適用するドメインを返します。
クッキーを適用するドメインを返します。 -
RDoc
:: Options # main _ page -> String | nil (45655.0) -
コマンドライン引数の --main オプションで指定したファイル名、クラス/モ ジュール名を返します。
コマンドライン引数の --main オプションで指定したファイル名、クラス/モ
ジュール名を返します。
指定しなかった場合は nil を返します。 -
RDoc
:: Options # main _ page=(val) (45655.0) -
コマンドライン引数の --main オプションと同様の指定を行います。
コマンドライン引数の --main オプションと同様の指定を行います。
@param val 設定するファイル名、クラス/モジュール名を文字列で指定します。 -
CGI
:: Cookie # domain=(value) (45604.0) -
クッキーを適用するドメインをセットします。
クッキーを適用するドメインをセットします。
@param value ドメインを指定します。 -
Integer
# remainder(other) -> Numeric (45604.0) -
self を other で割った余り r を返します。
self を other で割った余り r を返します。
r の符号は self と同じになります。
@param other self を割る数。
//emlist[][ruby]{
5.remainder(3) # => 2
-5.remainder(3) # => -2
5.remainder(-3) # => 2
-5.remainder(-3) # => -2
-1234567890987654321.remainder(13731) # => -6966
-1234567890987654321.remainder(13731.24) #... -
RSS
:: Rss :: Channel :: Item :: Category # domain (45604.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item :: Category # domain= (45604.0) -
@todo
@todo -
WEBrick
:: Cookie # domain -> String (36904.0) -
ドメイン名を文字列で表すアクセサです。
ドメイン名を文字列で表すアクセサです。
@param value ドメイン名を表す文字列を指定します。 -
Net
:: HTTPHeader # main _ type -> String|nil (27625.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_response(uri)
res.main_type # => "text"
//} -
Module
# using(module) -> self (27622.0) -
引数で指定したモジュールで定義された拡張を現在のクラス、モジュールで有 効にします。
引数で指定したモジュールで定義された拡張を現在のクラス、モジュールで有
効にします。
有効にした拡張の有効範囲については以下を参照してください。
* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html#label-Scope
@param module 有効にするモジュールを指定します。
@see Module#refine, main.using -
NoMethodError
# args -> [object] (27322.0) -
メソッド呼び出しに使われた引数を配列で返します。
メソッド呼び出しに使われた引数を配列で返します。
例:
begin
foobar(1,2,3)
rescue NoMethodError
p $!
p $!.name
p $!.args
end
# => #<NoMethodError: undefined method `foobar' for main:Object>
:foobar
[1, 2, 3] -
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (9622.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
スレッドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@param range 取得したいフレームの範囲を示す Range オブジェクトを指定します。
Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]... -
Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil (9622.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
スレッドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@param range 取得したいフレームの範囲を示す Range オブジェクトを指定します。
Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]... -
Thread
# raise(error _ type , message , traceback) -> () (9322.0) -
自身が表すスレッドで強制的に例外を発生させます。
自身が表すスレッドで強制的に例外を発生させます。
@param error_type Kernel.#raise を参照してください。
@param message Kernel.#raise を参照してください。
@param traceback Kernel.#raise を参照してください。
Thread.new {
sleep 1
Thread.main.raise "foobar"
}
begin
sleep
rescue
p $!, $@
end
=> #<RuntimeError: foobar>
[... -
Thread
:: Backtrace :: Location # base _ label -> String (9322.0) -
self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。
self が表すフレームの基本ラベルを返します。通常、
Thread::Backtrace::Location#label から修飾を取り除いたもので構成
されます。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.base_label
end
# => init... -
Thread
:: Backtrace :: Location # inspect -> String (9322.0) -
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文
字列に変換したオブジェクトを返します。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.inspect
end
# => "path/to/foo.rb:5:in ... -
Thread
:: Backtrace :: Location # to _ s -> String (9322.0) -
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し
ます。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.to_s
end
# => path/to/foo.rb:5:in `initialize'
# path/to/foo...