110件ヒット
[1-100件を表示]
(0.059秒)
モジュール
- Readline (11)
オブジェクト
-
Readline
:: HISTORY (22)
キーワード
- DEBUG (11)
- DEBUG= (11)
-
copy
_ stream (22) -
get
_ screen _ size (11) - length (11)
- size (11)
-
world
_ readable? (11) - write (22)
検索結果
先頭5件
-
File
. world _ readable?(path) -> Integer | nil (6202.0) -
path が全てのユーザから読めるならばそのファイルのパーミッションを表す 整数を返します。そうでない場合は nil を返します。
...場合は nil を返します。
整数の意味はプラットフォームに依存します。
@param path パスを表す文字列か IO オブジェクトを指定します。
//emlist[例][ruby]{
m = File.world_readable?("/etc/passwd")
"%o" % m # => "644"
//}... -
Readline
. get _ screen _ size -> [Integer , Integer] (3203.0) -
端末のサイズを [rows, columns] で返します。
...端末のサイズを [rows, columns] で返します。
@raise NotImplementedError サポートしていない環境で発生します。
@see GNU Readline ライブラリの rl_get_screen_size 関数... -
Readline
:: HISTORY . length -> Integer (3103.0) -
ヒストリに格納された内容の数を取得します。
...ヒストリに格納された内容の数を取得します。
例: ヒストリの内容を最初から順番に出力する。
require "readline"
Readline::HISTORY.push("foo", "bar", "baz")
p Readline::HISTORY.length #=> 3
@see Readline::HISTORY.empty?... -
Readline
:: HISTORY . size -> Integer (3103.0) -
ヒストリに格納された内容の数を取得します。
...ヒストリに格納された内容の数を取得します。
例: ヒストリの内容を最初から順番に出力する。
require "readline"
Readline::HISTORY.push("foo", "bar", "baz")
p Readline::HISTORY.length #=> 3
@see Readline::HISTORY.empty?... -
Thread
. DEBUG -> Integer (3102.0) -
スレッドのデバッグレベルを返します。
...れ以外の場合は、スレッドのデバッグログを標準出力に出力します。
初期値は 0 です。
使用するためには、THREAD_DEBUG を -1 にして Ruby をコンパイルする必要が
あります。
//emlist[例][ruby]{
Thread.DEBUG # => 0
//}
@see Thread.DEBUG=... -
Thread
. DEBUG=(val) (3007.0) -
スレッドのデバッグレベルを val に設定します。
... Integer に変換してから設定します。
偽 のときは 0 を設定します。
使用するためには、THREAD_DEBUG を -1 にして Ruby をコンパイルする必要が
あります。
//emlist[例][ruby]{
Thread.DEBUG # => 0
Thread.DEBUG = 1
Thread.DEBUG # => 1
//}
@see Thread.DE... -
IO
. copy _ stream(src , dst , copy _ length = nil) -> Integer (115.0) -
指定された src から dst へコピーします。 コピーしたバイト数を返します。
...指定します。
//emlist[例][ruby]{
IO.write("filetest", "abcdefghij")
IO.copy_stream("filetest", "filecopy", 2) # => 2
IO.read("filecopy") # => "ab"
IO.copy_stream("filetest", "filecopy", 3, 4) # => 3
IO.read("filecopy") # => "efg"
//}... -
IO
. copy _ stream(src , dst , copy _ length , src _ offset) -> Integer (115.0) -
指定された src から dst へコピーします。 コピーしたバイト数を返します。
...指定します。
//emlist[例][ruby]{
IO.write("filetest", "abcdefghij")
IO.copy_stream("filetest", "filecopy", 2) # => 2
IO.read("filecopy") # => "ab"
IO.copy_stream("filetest", "filecopy", 3, 4) # => 3
IO.read("filecopy") # => "efg"
//}... -
IO
. write(path , string , **opts) -> Integer (115.0) -
path で指定されるファイルを開き、string を書き込み、 閉じます。
...text) # => 66
IO.write("testfile", "0123456789", 20) #=> 10
IO.read("testfile")
# => "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n"
IO.write("testfile", "0123456789") #=> 10
IO.read("testfile") # => "0123456789"
//}
@see IO.binwrite... -
IO
. write(path , string , offset=nil , **opts) -> Integer (115.0) -
path で指定されるファイルを開き、string を書き込み、 閉じます。
...text) # => 66
IO.write("testfile", "0123456789", 20) #=> 10
IO.read("testfile")
# => "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n"
IO.write("testfile", "0123456789") #=> 10
IO.read("testfile") # => "0123456789"
//}
@see IO.binwrite...