種類
- 変数 (649)
- モジュール関数 (316)
- インスタンスメソッド (210)
キーワード
-
$ " (11) -
$ & (11) -
$ & # 39; (11) -
$ * (11) -
$ + (11) -
$ , (11) -
$ -0 (11) -
$ -F (11) -
$ -I (11) -
$ -i (11) -
$ / (11) -
$ 0 (11) -
$ 1 (11) -
$ 10 (11) -
$ 11 (11) -
$ 2 (11) -
$ 3 (11) -
$ 4 (11) -
$ 5 (11) -
$ 6 (11) -
$ 7 (11) -
$ 8 (11) -
$ 9 (11) -
$ : (11) -
$ ; (11) -
$ @ (11) -
$ ARGV (11) -
$ CFLAGS (11) -
$ ERROR _ POSITION (11) -
$ FIELD _ SEPARATOR (11) -
$ FILENAME (11) -
$ FS (11) -
$ INPUT _ RECORD _ SEPARATOR (11) -
$ LAST _ PAREN _ MATCH (11) -
$ LAST _ READ _ LINE (11) -
$ LDFLAGS (11) -
$ LOADED _ FEATURES (11) -
$ LOAD _ PATH (11) -
$ MATCH (11) -
$ OFS (11) -
$ ORS (11) -
$ OUTPUT _ FIELD _ SEPARATOR (11) -
$ OUTPUT _ RECORD _ SEPARATOR (11) -
$ POSTMATCH (11) -
$ PREMATCH (11) -
$ PROGRAM _ NAME (11) -
$ RS (11) -
$ \ (11) -
$ _ (11) -
$ ` (11) -
$ archdir (11) -
$ defs (11) -
$ hdrdir (11) -
$ libdir (11) -
$ libs (11) -
$ sitearchdir (11) -
$ sitelibdir (11) -
$ srcdir (11) -
$ topdir (11) - Float (11)
- Integer (11)
-
_ _ dir _ _ (11) - ` (11)
-
arg
_ config (11) - autoload (11)
- autoload? (11)
- caller (33)
-
cc
_ command (11) - chomp (11)
- chop (11)
-
cpp
_ command (11) -
create
_ header (11) -
create
_ tmpsrc (11) - desc (11)
-
dir
_ config (11) -
dummy
_ makefile (11) -
enable
_ config (22) -
find
_ executable (11) - format (11)
- gets (11)
- gsub (33)
- libpathflag (11)
-
link
_ command (11) -
merge
_ libs (11) - open (8)
-
psych
_ y (11) - readline (11)
- readlines (11)
- scanf (12)
- sprintf (11)
- sub (22)
-
trace
_ var (33) - trap (22)
-
untrace
_ var (11) -
with
_ config (22) - y (11)
検索結果
先頭5件
-
Kernel
. # sprintf(format , *arg) -> String (109.0) -
format 文字列を C 言語の sprintf と同じように解釈し、 引数をフォーマットした文字列を返します。
...トした文字列を返します。
@param format フォーマット文字列です。
@param arg フォーマットされる引数です。
@see Kernel.#printf,Time#strftime,Date.strptime
=== sprintf フォーマット
Ruby の sprintf フォーマットは基本的に C 言語の sprintf(3)......sprintf("%c", 'a') #=> "a"
//}
フラグ `-' と幅 の指定だけが意味を持ちます。
: s
文字列を出力します。
引数が String オブジェクトでなければ to_s メソッドにより文字列化
したものを引数として扱います。
: p
Object#inspect の......tf("%p", /e+/) #=> "/e+/"
//}
: d
: i
引数の数値を10進表現の整数として出力します。
引数が整数でなければ関数 Kernel.#Integer と同じ規則で整数に
変換されます。
//emlist[][ruby]{
p sprintf("%d", -1) #=> "-1"
p sprintf("%d", 3.1) #=> "3"
p sprint... -
Kernel
. # sub(pattern) {|matched| . . . } -> String (109.0) -
$_.sub とほぼ同じですが、置換が発生したときは、$_の内容を置き換える点が異なります。 コマンドラインオプションで -p または -n を指定した時のみ定義されます。
...現。
文字列を指定した場合は全く同じ文字列にだけマッチする
@param replace pattern で指定した文字列と置き換える文字列
//emlist[例][ruby]{
$_ # => "testtest\n"
sub(/es/, '!!') # => "t!!ttest\n"
//}
@see String#sub,$_... -
Kernel
. # sub(pattern , replace) -> String (109.0) -
$_.sub とほぼ同じですが、置換が発生したときは、$_の内容を置き換える点が異なります。 コマンドラインオプションで -p または -n を指定した時のみ定義されます。
...現。
文字列を指定した場合は全く同じ文字列にだけマッチする
@param replace pattern で指定した文字列と置き換える文字列
//emlist[例][ruby]{
$_ # => "testtest\n"
sub(/es/, '!!') # => "t!!ttest\n"
//}
@see String#sub,$_... -
Kernel
. # autoload?(const _ name) -> String | nil (108.0) -
const_name が Kernel.#autoload 設定されているか調べます。
...const_name が Kernel.#autoload 設定されているか調べます。
autoload 設定されていて、autoload 定数がまだ定義されてない(ロードされていない)
ときにそのパス名を返します。
autoload 設定されていないか、ロード済みなら nil を返し......ます。
@param const_name 定数をString または Symbol で指定します。
//emlist[例][ruby]{
# ------- /tmp/foo.rb ---------
class Foo
class Bar
end
end
# ----- end of /tmp/foo.rb ----
class Foo
end
p Foo.autoload?(:Bar) #=> nil
Foo.autoload :Bar, '/tmp/foo'
p Foo.autoload?......(:Bar) #=> "/tmp/foo"
p Foo::Bar #=> Foo::Bar
p Foo.autoload?(:Bar) #=> nil
//}
@see Kernel.#autoload... -
Kernel
. # chomp(rs = $ / ) -> String (108.0) -
$_.chomp とほぼ同じですが、置換が発生したときは、$_の内容を置き換える点が異なります。 コマンドラインオプションで -p または -n を指定した時のみ定義されます。
...//emlist[例: ruby -n で "test" を入力][ruby]{
$_ # => "test\n"
chomp # => "test"
//}
//emlist[例: ruby -n で "test," を入力し、 rs に "," を指定][ruby]{
$_ # => "test\n"
chomp # => "test,"
chomp(",") # => "test"
//}
@see String#chomp,$_,$/... -
Kernel
. # chop -> String (108.0) -
$_.chop とほぼ同じですが、置換が発生したときは、$_の内容を置き換える点が異なります。 コマンドラインオプションで -p または -n を指定した時のみ定義されます。
...コピーの方を更新し、
$_ に再代入します。
//emlist[例][ruby]{
$_ = "test\r\n"
$_ # => "test\r\n"
chop # => "test"
$_ = "test\n"
$_ # => "test\n"
chop # => "test"
$_ = "test"
$_ # => "test"
chop # => "tes"
//}
@see String#chop,$_... -
Kernel
$ $ -I -> [String] (104.0) -
Rubyライブラリをロードするときの検索パスです。
...Rubyライブラリをロードするときの検索パスです。
Kernel.#load や Kernel.#require
がファイルをロードする時に検索するディレクトリのリストを含む配列です。
起動時にはコマンドラインオプション -I で指定したディレクトリ、... -
Kernel
$ $ : -> [String] (104.0) -
Rubyライブラリをロードするときの検索パスです。
...Rubyライブラリをロードするときの検索パスです。
Kernel.#load や Kernel.#require
がファイルをロードする時に検索するディレクトリのリストを含む配列です。
起動時にはコマンドラインオプション -I で指定したディレクトリ、... -
Kernel
$ $ LOAD _ PATH -> [String] (104.0) -
Rubyライブラリをロードするときの検索パスです。
...Rubyライブラリをロードするときの検索パスです。
Kernel.#load や Kernel.#require
がファイルをロードする時に検索するディレクトリのリストを含む配列です。
起動時にはコマンドラインオプション -I で指定したディレクトリ、... -
Kernel
. # caller(range) -> [String] | nil (104.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...します。
@param range 取得したいスタックの範囲を示す Range オブジェクトを指定します。
@see Kernel.#set_trace_func,Kernel.#raise,
Kernel.#caller_locations
//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4)
end
de...