36件ヒット
[1-36件を表示]
(0.025秒)
別のキーワード
検索結果
先頭3件
-
Readline
:: HISTORY . push(*string) -> self (18120.0) -
ヒストリの最後に string で指定した文字列を追加します。複数の string を指定できます。 self を返します。
...ます。
@param string 文字列を指定します。複数指定できます。
例: "foo"を追加する。
require "readline"
Readline::HISTORY.push("foo")
p Readline::HISTORY[-1] #=> "foo"
例: "foo"、"bar"を追加する。
require "readline"
Readline::HISTORY.push("foo", "ba... -
Readline
:: HISTORY . <<(string) -> self (13.0) -
ヒストリの最後に string で指定した文字列を追加します。 self を返します。
...ヒストリの最後に string で指定した文字列を追加します。
self を返します。
@param string 文字列を指定します。
例: "foo"を追加する。
require "readline"
Readline::HISTORY << "foo"
p Readline::HISTORY[-1] #=> "foo"
例: "foo"、"bar"を追加す......る。
require "readline"
Readline::HISTORY << "foo" << "bar"
p Readline::HISTORY[-1] #=> "bar"
p Readline::HISTORY[-2] #=> "foo"
@see Readline::HISTORY.push... -
Readline
:: HISTORY . delete _ at(index) -> String | nil (13.0) -
index で指定したインデックスの内容をヒストリから削除し、その内容を返します。 該当する index の内容がヒストリになければ、 nil を返します。 index に 0 を指定すると Readline::HISTORY.shift と同様に最初の入力内容を削除します。 また、 -1 は最後の入力内容というように、index に負の値を指定することで、 最後から入力内容を取得することもできます。 index が -1 の場合は Readline::HISTORY.pop と同様に動作します。
...RY.pop と同様に動作します。
@param index 削除対象のヒストリのインデックスを指定します。
@raise NotImplementedError サポートしていない環境で発生します。
例:
require "readline"
Readline::HISTORY.push("foo", "bar", "baz")
Readline::HISTOR...