768件ヒット
[701-768件を表示]
(0.179秒)
種類
- インスタンスメソッド (634)
- 特異メソッド (50)
- クラス (48)
- モジュール関数 (36)
ライブラリ
- ビルトイン (768)
クラス
- Array (96)
- Encoding (12)
- Enumerator (14)
-
Enumerator
:: Lazy (136) - Exception (12)
- Hash (24)
- IO (12)
- Object (60)
-
ObjectSpace
:: WeakMap (24) - Set (6)
-
Thread
:: Backtrace :: Location (48)
モジュール
- Enumerable (240)
- Kernel (24)
- Process (12)
キーワード
- == (12)
- Enumerator (12)
- Lazy (12)
- Location (12)
- WeakMap (12)
- [] (12)
- []= (12)
-
absolute
_ path (12) -
base
_ label (12) - binwrite (12)
-
caller
_ locations (24) -
chunk
_ while (12) - collect (60)
- collect! (27)
-
collect
_ concat (36) -
enum
_ for (48) -
filter
_ map (18) -
flat
_ map (36) - getrlimit (12)
- grep (12)
-
grep
_ v (10) - inspect (12)
- lazy (12)
-
locale
_ charmap (12) - map! (27)
- new (26)
-
slice
_ after (24) -
slice
_ before (24) -
slice
_ when (12) -
sort
_ by (24) - sum (24)
- tap (12)
-
to
_ enum (48) -
to
_ h (14) -
to
_ proc (10) -
to
_ s (12)
検索結果
先頭5件
-
Object
# to _ enum(method = :each , *args) {|*args| . . . } -> Enumerator (8006.0) -
Enumerator.new(self, method, *args) を返します。
...す。
@param args 呼び出すメソッドに渡される引数です。
//emlist[][ruby]{
str = "xyz"
enum = str.enum_for(:each_byte)
p(a = enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]
# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}... -
Process
. # getrlimit(resource) -> [Integer] (8006.0) -
カレントプロセスでのリソースの制限値を、整数の配列として返します。 返り値は、現在の制限値 cur_limit と、制限値として設定可能な最大値 max_limit の 配列 [cur_limit, max_limit] です。
...(バイト) (NetBSD, FreeBSD)
例:
include Process
p lim = getrlimit(RLIMIT_STACK) #=> [8388608, 18446744073709551615]
p lim.map{|i| i == RLIM_INFINITY ? "unlimited" : "#{i/(1024**2)}MB" } #=> ["8MB", "unlimited"]
@see Process.#setrlimit, getrlimit(2)... -
Thread
:: Backtrace :: Location # absolute _ path -> String (8006.0) -
self が表すフレームの絶対パスを返します。
...][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.absolute_path
end
# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}
@see Thread::Backtrace::Location#path... -
Thread
:: Backtrace :: Location # base _ label -> String (8006.0) -
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
# => initialize
# new
# <main>
//}
@see Thread::Backtrace::Location#label... -
Thread
:: Backtrace :: Location # inspect -> String (8006.0) -
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。
...][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 `initialize'"
# "path/to/foo.rb:9:in `new'"
# "path/to/foo.rb:9:in `<main>'"
//}... -
Thread
:: Backtrace :: Location # to _ s -> String (8006.0) -
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。
...mlist[例][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.rb:9:in `new'
# path/to/foo.rb:9:in `<main>'
//}... -
Enumerator
. new(size=nil) {|y| . . . } -> Enumerator (8001.0) -
Enumerator オブジェクトを生成して返します。与えられたブロックは Enumerator::Yielder オブジェクトを 引数として実行されます。
Enumerator オブジェクトを生成して返します。与えられたブロックは Enumerator::Yielder オブジェクトを
引数として実行されます。
生成された Enumerator オブジェクトに対して each を呼ぶと、この生成時に指定されたブロックを
実行し、Yielder オブジェクトに対して << メソッドが呼ばれるたびに、
each に渡されたブロックが繰り返されます。
new に渡されたブロックが終了した時点で each の繰り返しが終わります。
このときのブロックの返り値が each の返り値となります。
@param size 生成する Enumerator...