ライブラリ
- ビルトイン (11)
-
irb
/ context (2) -
irb
/ extend-command (1) - matrix (2)
- openssl (1)
-
rdoc
/ context (3) -
rdoc
/ markdown (2) -
rexml
/ document (12) -
rexml
/ parsers / pullparser (1) -
ripper
/ lexer (2)
クラス
-
ARGF
. class (1) - IO (1)
-
IRB
:: Context (2) - Matrix (2)
-
OpenSSL
:: SSL :: SSLContext (1) -
RDoc
:: Context (3) -
RDoc
:: Markdown (2) -
REXML
:: AttlistDecl (1) -
REXML
:: Attribute (1) -
REXML
:: Comment (1) -
REXML
:: DocType (2) -
REXML
:: Document (1) -
REXML
:: Element (3) -
REXML
:: Instruction (1) -
REXML
:: Parsers :: PullEvent (1) -
REXML
:: Text (1) -
REXML
:: XMLDecl (1) - Regexp (1)
-
Ripper
:: Lexer (2) - String (3)
- Symbol (5)
モジュール
キーワード
- =~ (1)
- [] (1)
- context (2)
- context= (1)
-
each
_ with _ index (2) -
event
_ type (1) - extension (1)
- extension? (1)
-
find
_ local _ symbol (1) -
find
_ symbol (1) -
install
_ alias _ method (1) - lex (1)
- match (2)
- match? (2)
- next (1)
-
node
_ type (9) - parse (1)
-
prompt
_ mode (1) -
prompt
_ mode= (1) -
read
_ nonblock (2) -
session
_ cache _ stats (1) - slice (1)
- succ (1)
- visibility (1)
検索結果
先頭5件
-
Symbol
# next -> Symbol (81610.0) -
シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。
シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。
(self.to_s.next.intern と同じです。)
:a.next # => :b
:foo.next # => :fop
@see String#succ -
Symbol
# succ -> Symbol (72310.0) -
シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。
シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。
(self.to_s.next.intern と同じです。)
:a.next # => :b
:foo.next # => :fop
@see String#succ -
Symbol
# [](regexp , nth = 0) -> String | nil (63304.0) -
正規表現 regexp の nth 番目の括弧にマッチする最初の部分文字列を返します。
正規表現 regexp の nth 番目の括弧にマッチする最初の部分文字列を返します。
(self.to_s[regexp, nth] と同じです。)
@param regexp 正規表現を指定します。
@param nth 取得したい正規表現レジスタのインデックスを指定します。
:foobar[/bar/] # => "bar"
:foobarbaz[/(ba.)(ba.)/, 0] # => "barbaz"
:foobarbaz[/(ba.)(ba.)/, 1] # => "bar"
:foobarbaz[/(ba.)(ba.)/, 2] # => "baz"
... -
Symbol
# match?(regexp , pos = 0) -> bool (63304.0) -
regexp.match?(self, pos) と同じです。 regexp が文字列の場合は、正規表現にコンパイルします。 詳しくは Regexp#match? を参照してください。
regexp.match?(self, pos) と同じです。
regexp が文字列の場合は、正規表現にコンパイルします。
詳しくは Regexp#match? を参照してください。
例:
:Ruby.match?(/R.../) # => true
:Ruby.match?('Ruby') # => true
:Ruby.match?('Ruby',1) # => false
:Ruby.match?('uby',1) # => true
:Ruby.match?(/P.../) # => false
$& ... -
Symbol
# slice(regexp , nth = 0) -> String | nil (63304.0) -
正規表現 regexp の nth 番目の括弧にマッチする最初の部分文字列を返します。
正規表現 regexp の nth 番目の括弧にマッチする最初の部分文字列を返します。
(self.to_s[regexp, nth] と同じです。)
@param regexp 正規表現を指定します。
@param nth 取得したい正規表現レジスタのインデックスを指定します。
:foobar[/bar/] # => "bar"
:foobarbaz[/(ba.)(ba.)/, 0] # => "barbaz"
:foobarbaz[/(ba.)(ba.)/, 1] # => "bar"
:foobarbaz[/(ba.)(ba.)/, 2] # => "baz"
... -
Ripper
:: Lexer # lex -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (27907.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
ライブラリ内部で使用します。 Ripper.lex を使用してください。 -
RDoc
:: Context # find _ symbol(symbol , method=nil) (27706.0) -
Look up the given symbol. If method is non-nil, then we assume the symbol references a module that contains that method
Look up the given symbol. If method is non-nil, then we assume
the symbol references a module that contains that method -
RDoc
:: Context # find _ local _ symbol(symbol) (27658.0) -
Finds a method, constant, attribute, module or files named +symbol+ in this context
Finds a method, constant, attribute, module or files named +symbol+ in
this context -
REXML
:: Element # context -> {Symbol => object} | nil (27625.0) -
要素の「コンテキスト」を Hash で返します。
要素の「コンテキスト」を Hash で返します。
コンテキストとは text node (REXML::Text) での特別な文字、特に空白について
の取り扱いについての設定です。
以下の Symbol をハッシュのキーとして使います。
: :respect_whitespace
空白を考慮して欲しい要素の名前の集合を文字列の配列で指定します。
また、すべての要素で空白を考慮して欲しい場合には
:all を指定します。
デフォルト値は :all です。
REXML::Element#whitespace も参照してください。
: :compress_whitespac... -
REXML
:: DocType # context -> { Symbol => object } (27607.0) -
DTD が属する文書の「コンテキスト」を返します。
DTD が属する文書の「コンテキスト」を返します。
具体的には親ノードである REXML::Document オブジェクトの
REXML::Element#context を返します。
コンテキストの具体的な内容については REXML::Element#context を
参照してください。 -
REXML
:: Element # context=(value) (27322.0) -
要素の「コンテキスト」を Hash で設定します。
要素の「コンテキスト」を Hash で設定します。
コンテキストとは、 text node (REXML::Text) での特別な文字、特に空白について
の取り扱いについての設定です。
以下の Symbol をハッシュのキーとして使います。
: :respect_whitespace
空白を考慮して欲しい要素の名前の集合を文字列の配列で指定します。
また、すべての要素で空白を考慮して欲しい場合には
:all を指定します。
デフォルト値は :all です。
REXML::Element#whitespace も参照してください。
: :compress_whitesp... -
REXML
:: Text # node _ type -> Symbol (18355.0) -
Symbol :text を返します。
Symbol :text を返します。 -
Matrix
# each _ with _ index(which = :all) -> Enumerator (18322.0) -
行列の各要素をその位置とともに引数としてブロックを呼び出します。
行列の各要素をその位置とともに引数としてブロックを呼び出します。
which で処理する要素の範囲を指定することができます。
Matrix#each と同じなのでそちらを参照してください。
ブロックを省略した場合、 Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col|
puts "#{e} at #{row}, #{col}"
end
# => 1 at 0, 0
# => 2 at 0, 1
# => 3... -
Matrix
# each _ with _ index(which = :all) {|e , row , col| . . . } -> self (18322.0) -
行列の各要素をその位置とともに引数としてブロックを呼び出します。
行列の各要素をその位置とともに引数としてブロックを呼び出します。
which で処理する要素の範囲を指定することができます。
Matrix#each と同じなのでそちらを参照してください。
ブロックを省略した場合、 Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col|
puts "#{e} at #{row}, #{col}"
end
# => 1 at 0, 0
# => 2 at 0, 1
# => 3... -
RDoc
:: Markdown # extension(name , enable) -> () (18322.0) -
引数 name で指定した拡張の有効/無効を設定します。
引数 name で指定した拡張の有効/無効を設定します。
@param name 拡張の名前を Symbol で指定します。
@param enable 有効にする場合は true を、無効にする場合は false を指定し
ます。 -
RDoc
:: Markdown # extension?(name) (18322.0) -
引数 name で指定した拡張が有効かどうかを返します。
引数 name で指定した拡張が有効かどうかを返します。
@param name 拡張の名前を Symbol で指定します。 -
Ripper
:: Lexer # parse -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (9607.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た だし Ripper::Lexer#lex と違い、結果をソートしません。
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た
だし Ripper::Lexer#lex と違い、結果をソートしません。
ライブラリ内部で使用します。 -
IRB
:: Context # prompt _ mode -> Symbol (9355.0) -
現在のプロンプトモードを Symbol で返します。
現在のプロンプトモードを Symbol で返します。
オリジナルのプロンプトモードを定義していた場合はそのモードを返します。
そうでない場合は、:DEFAULT、:CLASSIC、:SIMPLE、:INF_RUBY、:XMP、:NULL
のいずれかを返します。
定義済みのプロンプトモードの内容については、IRB.conf[:PROMPT][mode] を
参照してください。
@see IRB::Context#prompt_mode=, lib:irb#customize_prompt -
REXML
:: AttlistDecl # node _ type -> Symbol (9355.0) -
Symbol :attlistdecl を返します。
Symbol :attlistdecl を返します。 -
REXML
:: DocType # node _ type -> Symbol (9355.0) -
Symbol :doctype を返します。
Symbol :doctype を返します。 -
REXML
:: Instruction # node _ type -> Symbol (9355.0) -
Symbol :processing_instruction を返します。
Symbol :processing_instruction を返します。 -
OpenSSL
:: SSL :: SSLContext # session _ cache _ stats -> {Symbol -> Integer} (9307.0) -
セッションキャッシュの内部統計情報をハッシュテーブルで返します。
セッションキャッシュの内部統計情報をハッシュテーブルで返します。
ハッシュテーブルの各キーとその意味は以下の通りです。
* :cache_num 内部キャッシュに保持されているセッションの数
* :connect クライアント側でハンドシェイクした回数
* :connect_good クライアント側でハンドシェイクが成功した回数
* :connect_renegotiate クライアント側で再ネゴシエイトした回数
* :accept サーバ側でハンドシェイクした回数
* :accept_good サーバ側でハンドシェイクが成功した回数
* :accept_ren... -
REXML
:: Attribute # node _ type -> Symbol (9307.0) -
「:attribute」というシンボルを返します。
「:attribute」というシンボルを返します。 -
REXML
:: Comment # node _ type -> Symbol (9307.0) -
シンボル :comment を返します。
シンボル :comment を返します。 -
REXML
:: Document # node _ type -> Symbol (9307.0) -
シンボル :document を返します。
シンボル :document を返します。 -
REXML
:: Element # node _ type -> Symbol (9307.0) -
シンボル :element を返します。
シンボル :element を返します。 -
REXML
:: Parsers :: PullEvent # event _ type -> Symbol (9307.0) -
イベントの種類をシンボルで返します。
イベントの種類をシンボルで返します。
詳しくは c:REXML::Parsers::PullParser#event_type を参照してください。 -
REXML
:: XMLDecl # node _ type -> Symbol (9307.0) -
シンボル :xmldecl を返します。
シンボル :xmldecl を返します。 -
RDoc
:: Context # visibility -> :public | :protected | :private (9052.0) -
自身の可視性を Symbol で返します。
自身の可視性を Symbol で返します。 -
IRB
:: ExtendCommandBundle # install _ alias _ method(to , from , override = NO _ OVERRIDE) (9040.0) -
メソッドのエイリアスを定義します。ライブラリ内部で使用します。
メソッドのエイリアスを定義します。ライブラリ内部で使用します。
@param to 新しいメソッド名を Symbol か文字列で指定します。
@param from 元のメソッド名を Symbol か文字列で指定します。
@param override 新しいメソッド名が定義済みであった場合にそのメソッドを
上書きするかどうかを
IRB::ExtendCommandBundle::NO_OVERRIDE、
IRB::ExtendCommandBundle::OVERRIDE_PRIVATE_... -
Regexp
# =~(string) -> Integer | nil (9040.0) -
文字列 string との正規表現マッチを行います。マッチした場合、 マッチした位置のインデックスを返します(先頭は0)。マッチしなかった 場合、あるいは string が nil の場合には nil を返 します。
文字列 string との正規表現マッチを行います。マッチした場合、
マッチした位置のインデックスを返します(先頭は0)。マッチしなかった
場合、あるいは string が nil の場合には nil を返
します。
//emlist[例][ruby]{
p /foo/ =~ "foo" # => 0
p /foo/ =~ "afoo" # => 1
p /foo/ =~ "bar" # => nil
//}
組み込み変数 $~ もしくは Regexp.last_match にマッチに関する情報 MatchData が設定されます。
文字列のかわりにSymbolをマッチさせることが... -
IRB
:: Context # prompt _ mode=(mode) (9022.0) -
プロンプトモードを mode に設定します。
プロンプトモードを mode に設定します。
@param mode プロンプトモードを Symbol で指定します。オリジナルの
プロンプトモードか、:DEFAULT、:CLASSIC、:SIMPLE、:INF_RUBY、
:XMP、:NULL のいずれを指定してください。
@see IRB::Context#prompt_mode, lib:irb#customize_prompt -
ARGF
. class # read _ nonblock(maxlen , outbuf = nil , exception: true) -> String | Symbol | nil (607.0) -
処理中のファイルからノンブロッキングモードで最大 maxlen バイト読み込みます。 詳しくは IO#read_nonblock を参照してください。
処理中のファイルからノンブロッキングモードで最大 maxlen バイト読み込みます。
詳しくは IO#read_nonblock を参照してください。
ARGF.class#read などとは違って複数ファイルを同時に読み込むことはありません。
@param maxlen 読み込む長さの上限を整数で指定します。
@param outbuf 読み込んだデータを格納する String オブジェクトを指定します。
@param exception 読み込み時に Errno::EAGAIN、
Errno::EWOULDBLOCK が発生する代わりに
... -
IO
# read _ nonblock(maxlen , outbuf = nil , exception: true) -> String | Symbol | nil (607.0) -
IO をノンブロッキングモードに設定し、 その後で read(2) システムコールにより 長さ maxlen を上限として読み込み、文字列として返します。 EAGAIN, EINTR などは Errno::EXXX 例外として呼出元に報告されます。
IO をノンブロッキングモードに設定し、
その後で read(2) システムコールにより
長さ maxlen を上限として読み込み、文字列として返します。
EAGAIN, EINTR などは Errno::EXXX 例外として呼出元に報告されます。
発生した例外 がErrno::EAGAIN、 Errno::EWOULDBLOCK である場合は、
その例外オブジェクトに IO::WaitReadable が Object#extend
されます。
なお、バッファが空でない場合は、read_nonblock はバッファから読み込みます。この場合、read(2) システムコールは呼ばれません... -
String
# match(regexp , pos = 0) -> MatchData | nil (322.0) -
regexp.match(self, pos) と同じです。 regexp が文字列の場合は、正規表現にコンパイルします。 詳しくは Regexp#match を参照してください。
regexp.match(self, pos) と同じです。
regexp が文字列の場合は、正規表現にコンパイルします。
詳しくは Regexp#match を参照してください。
//emlist[例: regexp のみの場合][ruby]{
'hello'.match('(.)\1') # => #<MatchData "ll" 1:"l">
'hello'.match('(.)\1')[0] # => "ll"
'hello'.match(/(.)\1/)[0] # => "ll"
'hello'.match('xx') # => nil
//}
... -
String
# match(regexp , pos = 0) {|m| . . . } -> object (322.0) -
regexp.match(self, pos) と同じです。 regexp が文字列の場合は、正規表現にコンパイルします。 詳しくは Regexp#match を参照してください。
regexp.match(self, pos) と同じです。
regexp が文字列の場合は、正規表現にコンパイルします。
詳しくは Regexp#match を参照してください。
//emlist[例: regexp のみの場合][ruby]{
'hello'.match('(.)\1') # => #<MatchData "ll" 1:"l">
'hello'.match('(.)\1')[0] # => "ll"
'hello'.match(/(.)\1/)[0] # => "ll"
'hello'.match('xx') # => nil
//}
... -
String
# match?(regexp , pos = 0) -> bool (322.0) -
regexp.match?(self, pos) と同じです。 regexp が文字列の場合は、正規表現にコンパイルします。 詳しくは Regexp#match? を参照してください。
regexp.match?(self, pos) と同じです。
regexp が文字列の場合は、正規表現にコンパイルします。
詳しくは Regexp#match? を参照してください。
//emlist[例][ruby]{
"Ruby".match?(/R.../) #=> true
"Ruby".match?(/R.../, 1) #=> false
"Ruby".match?(/P.../) #=> false
$& #=> nil
//}
@see Regexp#match?, Symbol#match?