クラス
- Array (108)
- MatchData (78)
-
Net
:: HTTP (36) -
Net
:: HTTPResponse (24) - Object (12)
-
Psych
:: Stream (24) -
Psych
:: Visitors :: YAMLTree (12) - String (40)
- Symbol (12)
- Thread (24)
-
Thread
:: ConditionVariable (24) -
Thread
:: Queue (36) -
Thread
:: SizedQueue (36)
モジュール
- GC (12)
キーワード
- [] (72)
- []= (24)
- at (12)
-
backtrace
_ locations (24) - broadcast (12)
- byteoffset (6)
-
delete
_ prefix (8) -
delete
_ prefix! (8) - deq (24)
-
end
_ with? (18) - fill (24)
-
garbage
_ collect (12) - head (12)
-
local
_ host= (12) -
local
_ port= (12) - offset (24)
- pop (24)
-
read
_ body (24) -
respond
_ to? (12) - shift (24)
- signal (12)
- slice! (24)
-
start
_ with? (18)
検索結果
先頭5件
- Psych
:: Stream # start(encoding = Psych :: Nodes :: Stream :: UTF8) -> Psych :: Stream - Psych
:: Stream # start(encoding = Psych :: Nodes :: Stream :: UTF8) {|em| . . . } -> Psych :: Stream - Psych
:: Visitors :: YAMLTree # start(encoding = Nodes :: Stream :: UTF8) -> Psych :: Nodes :: Stream - Symbol
# start _ with?(*prefixes) -> bool - String
# start _ with?(*prefixes) -> bool
-
Psych
:: Stream # start(encoding = Psych :: Nodes :: Stream :: UTF8) -> Psych :: Stream (24225.0) -
Ruby オブジェクトを YAML document に変換するための準備をします。
...
Ruby オブジェクトを YAML document に変換するための準備をします。
変換された document は Psych::Stream.new で指定した
出力先に出力されます。
finish を呼び出すことで出力が完了します(finish を呼び出さないと
最後まで出力され......ない場合があります)。
ブロック付きで start を呼び出すと、変換準備を終えた Stream オブジェクト
(self) がブロックに渡され、ブロックが呼び出された後に finish を呼び出します。
これによって finish を確実に呼び出すこと... -
Psych
:: Stream # start(encoding = Psych :: Nodes :: Stream :: UTF8) {|em| . . . } -> Psych :: Stream (24225.0) -
Ruby オブジェクトを YAML document に変換するための準備をします。
...
Ruby オブジェクトを YAML document に変換するための準備をします。
変換された document は Psych::Stream.new で指定した
出力先に出力されます。
finish を呼び出すことで出力が完了します(finish を呼び出さないと
最後まで出力され......ない場合があります)。
ブロック付きで start を呼び出すと、変換準備を終えた Stream オブジェクト
(self) がブロックに渡され、ブロックが呼び出された後に finish を呼び出します。
これによって finish を確実に呼び出すこと... -
Psych
:: Visitors :: YAMLTree # start(encoding = Nodes :: Stream :: UTF8) -> Psych :: Nodes :: Stream (24218.0) -
Ruby オブジェクトから YAML AST への変換のための準備をします。
...Ruby オブジェクトから YAML AST への変換のための準備をします。
Psych::Visitors::YAMLTree#push が呼び出されたとき、
まだこのメソッドが呼び出されていなければ push メソッドがこの
メソッドを呼び出し、変換の準備をします。
e......ncoding には以下のいずれかを指定できます。
* Psych::Nodes::Node::UTF8
* Psych::Nodes::Node::UTF16BE
* Psych::Nodes::Node::UTF16LE
@param encoding YAML AST に設定するエンコーディング... -
Symbol
# start _ with?(*prefixes) -> bool (12244.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...とき true を返します。
(self.to_s.start_with?と同じです。)
@param prefixes パターンを表す文字列または正規表現 (のリスト)
@see Symbol#end_with?
@see String#start_with?
//emlist[][ruby]{
:hello.start_with?("hell") #=> true
:hello.start_with?(/H/i)......#=> true
# returns true if one of the prefixes matches.
:hello.start_with?("heaven", "hell") #=> true
:hello.start_with?("heaven", "paradise") #=> false
//}... -
String
# start _ with?(*prefixes) -> bool (12238.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...き true を返します。
@param prefixes パターンを表す文字列または正規表現 (のリスト)
//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing", "str") # => true
"string".start_with?(/\w....../) # => true
"string".start_with?(/\d/) # => false
//}
@see String#end_with?
@see String#delete_prefix, String#delete_prefix!... -
String
# start _ with?(*strs) -> bool (12226.0) -
self の先頭が strs のいずれかであるとき true を返します。
...strs のいずれかであるとき true を返します。
@param strs パターンを表す文字列 (のリスト)
//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing", "str") # => true
//}
@see Str......ing#end_with?... -
MatchData
# byteoffset(name) -> [Integer , Integer] | [nil , nil] (6324.0) -
name という名前付きグループに対応する部分文字列のバイト単位のオフセットの 配列 [start, end] を返します。
...name という名前付きグループに対応する部分文字列のバイト単位のオフセットの
配列 [start, end] を返します。
nameの名前付きグループにマッチした部分文字列がなければ
[nil, nil] を返します。
@param name 名前(シンボルか文字......ます。
//emlist[例][ruby]{
/(?<year>\d{4})年(?<month>\d{1,2})月(?:(?<day>\d{1,2})日)?/ =~ "2021年1月"
p $~.byteoffset('year') # => [0, 4]
p $~.byteoffset(:year) # => [0, 4]
p $~.byteoffset('month') # => [7, 8]
p $~.byteoffset(:month) # => [7, 8]
p $~.byteoffset('day') # =>......[nil, nil]
p $~.byteoffset('century') # => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#offset... -
MatchData
# byteoffset(n) -> [Integer , Integer] | [nil , nil] (6319.0) -
n 番目の部分文字列のバイト単位のオフセットの 配列 [start, end] を返します。
...のオフセットの
配列 [start, end] を返します。
n番目の部分文字列がマッチしていなければ [nil, nil] を返します。
@param n 部分文字列を指定する数値
@raise IndexError 範囲外の n を指定した場合に発生します。
@see MatchData#offset... -
Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil (6314.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...トレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフ......locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
//}
@see Thread::Backtrace......::Location... -
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (6214.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...トレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフ......locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
//}
@see Thread::Backtrace......::Location... -
Object
# respond _ to?(name , include _ all = false) -> bool (6143.0) -
オブジェクトがメソッド name を持つとき真を返します。
...ような NotImplementedError が発生する場合は false を返します。
※ NotImplementedError が発生する場合に false を返すのは
Rubyの組み込みライブラリや標準ライブラリなど、C言語で実装されているメソッドのみです。
Rubyで実装され......tImplementedError が発生する場合は true を返します。
メソッドが定義されていない場合は、Object#respond_to_missing? を呼
び出してその結果を返します。
@param name Symbol または文字列で指定するメソッド名です。
@param include_all privat......protected メソッドを確認の対象に
含めるかを true か false で指定します。省略した場合
は false(含めない) を指定した事になります。
//emlist[][ruby]{
class F
def hello
"Bonjour"
end
end
class D
private
d... -
MatchData
# offset(name) -> [Integer , Integer] | [nil , nil] (6131.0) -
name という名前付きグループに対応する部分文字列のオフセットの配列 [start, end] を返 します。
...name という名前付きグループに対応する部分文字列のオフセットの配列 [start, end] を返
します。
//emlist[例][ruby]{
[ self.begin(name), self.end(name) ]
//}
と同じです。nameの名前付きグループにマッチした部分文字列がなければ
[nil, ni......emlist[例][ruby]{
/(?<year>\d{4})年(?<month>\d{1,2})月(?:(?<day>\d{1,2})日)?/ =~ "2021年1月"
p $~.offset('year') # => [0, 4]
p $~.offset(:year) # => [0, 4]
p $~.offset('month') # => [5, 6]
p $~.offset(:month) # => [5, 6]
p $~.offset('day') # => [nil, nil]
p $~.offset('century')......# => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#begin, MatchData#end......# => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#begin, MatchData#end, MatchData#offset...