1804件ヒット
[1201-1300件を表示]
(0.105秒)
ライブラリ
- ビルトイン (721)
- delegate (12)
- digest (12)
- e2mmap (6)
-
irb
/ cmd / load (12) -
irb
/ xmp (12) - json (24)
-
minitest
/ unit (1) - mkmf (612)
- open-uri (24)
- openssl (24)
- pathname (12)
- pp (12)
- psych (24)
- rake (36)
-
rubygems
/ custom _ require (12) - scanf (12)
- shell (12)
-
shell
/ command-processor (12) -
shell
/ filter (12) - stringio (72)
- timeout (8)
- un (72)
- zlib (48)
クラス
-
ARGF
. class (75) - Array (48)
- BasicObject (24)
- Binding (12)
- Exception (24)
- IO (84)
-
IRB
:: ExtendCommand :: Load (12) - LoadError (12)
- Module (132)
- Object (144)
-
OpenSSL
:: BN (12) - Shell (12)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (12) - String (72)
- StringIO (72)
- SystemExit (12)
- Thread (72)
- TracePoint (12)
- UncaughtThrowError (22)
-
Zlib
:: GzipWriter (48)
モジュール
- Exception2MessageMapper (6)
- Kernel (836)
-
MiniTest
:: Assertions (1) -
OpenSSL
:: Buffering (12) -
OpenURI
:: OpenRead (24)
キーワード
- % (12)
- DelegateClass (12)
- Digest (12)
- JSON (12)
- Pathname (12)
- [] (18)
-
add
_ trace _ func (12) - ancestors (12)
- autoload (12)
-
cc
_ command (12) -
check
_ signedness (24) -
check
_ sizeof (24) - class (12)
-
class
_ eval (24) -
const
_ defined? (12) - constants (12)
-
convertible
_ int (24) - cp (12)
-
create
_ makefile (12) -
create
_ tmpsrc (12) -
defined
_ class (12) -
depend
_ rules (12) - desc (12)
-
egrep
_ cpp (24) - eval (12)
- exception (24)
- execute (12)
- exit (12)
-
find
_ executable (12) -
find
_ header (12) -
find
_ library (24) -
find
_ type (24) - freeze (12)
- gets (27)
-
have
_ header (24) -
have
_ macro (24) -
have
_ struct _ member (24) -
have
_ type (24) - help (12)
- hex (12)
- httpd (12)
- import (12)
- include (12)
- inspect (12)
- install (12)
-
install
_ files (12) -
instance
_ eval (24) -
instance
_ variables (12) - j (12)
- kill (12)
- libpathflag (12)
-
link
_ command (12) - method (12)
- mkdir (12)
-
module
_ eval (24) - namespace (12)
- oct (12)
- open (24)
- path (12)
-
pretty
_ print (24) - print (60)
- printf (60)
-
psych
_ y (12) -
public
_ instance _ method (12) - putc (36)
- puts (48)
- raise (12)
-
remove
_ const (12) - reopen (60)
- require (12)
- rmdir (12)
- sample (48)
- scanf (12)
- send (24)
-
set
_ trace _ func (12) - skip (1)
- status (12)
- tag (11)
- terminate (12)
- test (18)
- timeout (8)
-
to
_ a (12) -
to
_ ary (12) -
to
_ f (12) -
to
_ i (12) -
to
_ int (12) -
to
_ str (12) -
try
_ compile (24) -
try
_ constant (24) -
try
_ do (24) -
try
_ link (24) -
try
_ run (24) -
try
_ static _ assert (24) -
try
_ type (24) - value (11)
-
with
_ werror (24) - xmp (12)
- xpopen (24)
- xsystem (12)
- y (12)
検索結果
先頭5件
-
Zlib
:: GzipWriter # print(*str) -> nil (6107.0) -
引数を自身に順に出力します。引数を省略した場合は、$_ を出力します。
...す。
@param str 出力するオブジェクトを指定します。
require 'zlib'
filename='hoge1.gz'
fw = File.open(filename, "w")
Zlib::GzipWriter.wrap(fw, Zlib::BEST_COMPRESSION){|gz|
gz.print "ugo"
}
fr = File.open(filename)
Zlib::GzipReader.wrap(fr){|gz|
puts gz.read......}
#=> ugo
@see IO#print, Kernel.#print... -
Zlib
:: GzipWriter # printf(format , *args) -> nil (6107.0) -
C 言語の printf と同じように、format に従い引数 を文字列に変換して、自身に出力します。
...C 言語の printf と同じように、format に従い引数
を文字列に変換して、自身に出力します。
@param format フォーマット文字列を指定します。print_format を参照してください。
@param args フォーマットされるオブジェクトを指定し......。
require 'zlib'
filename='hoge1.gz'
fw = File.open(filename, "w")
Zlib::GzipWriter.wrap(fw, Zlib::BEST_COMPRESSION){|gz|
gz.printf("\n%9s", "bar")
}
fr = File.open(filename)
Zlib::GzipReader.wrap(fr){|gz|
puts gz.read
}
#=> bar
@see IO#printf, Kernel.#printf... -
Zlib
:: GzipWriter # putc(ch) -> object (6107.0) -
文字 ch を自身に出力します。
...param ch 出力する文字を数値または文字列で指定します。
@return ch を返します。
require 'zlib'
filename='hoge1.gz'
fw = File.open(filename, "w")
Zlib::GzipWriter.wrap(fw, Zlib::BEST_COMPRESSION){|gz|
gz.putc ?u
gz.putc ?g
gz.putc ?o
}
fr = File.op......en(filename)
Zlib::GzipReader.wrap(fr){|gz|
puts gz.read
}
#=> ugo
@see IO#putc, Kernel.#putc... -
Zlib
:: GzipWriter # puts(*str) -> nil (6107.0) -
各引数を自身に出力し、それぞれの後に改行を出力します。
...す。
@param str 出力したいオブジェクトを指定します。
require 'zlib'
filename='hoge1.gz'
fw = File.open(filename, "w")
Zlib::GzipWriter.wrap(fw, Zlib::BEST_COMPRESSION){|gz|
gz.puts "fuga"
}
fr = File.open(filename)
Zlib::GzipReader.wrap(fr){|gz|
puts gz.r......ead
}
#=> fuga
@see IO#puts, Kernel.#puts... -
IO
# reopen(io) -> self (6102.0) -
自身を指定された io に繋ぎ換えます。
...された io に繋ぎ換えます。
クラスも io に等しくなることに注意してください。
IO#pos, IO#lineno などは指定された io と等しくなります。
@param io 自身を繋ぎ換えたい IO オブジェクトを指定します。
@raise IOError 指定された io... -
Exception2MessageMapper
# def _ e2message(exception _ class , message _ format) -> Class (3107.0) -
すでに存在する例外クラス exception_class に、 エラーメッセージ用フォーマット message_format を関連づけます。
...に存在する例外クラス exception_class に、
エラーメッセージ用フォーマット message_format を関連づけます。
このフォーマットは Exception2MessageMapper#Raise,
Exception2MessageMapper#Fail で使用します。
@param exception_class メッセージを登録......する例外クラスを指定します。
@param message_format メッセージのフォーマットを指定します。
Kernel.#sprintf のフォーマット文字列と同じ形式を使用できます。
@return exception_class を返します。... -
Shell
:: CommandProcessor # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (3059.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...
Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@para......。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exist......s?, "foo"] # => true
p sh["exists?", "foo"] # => true
@see Kernel.#test, FileTest... -
Shell
:: CommandProcessor # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (3059.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...
Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@para......。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exist......s?, "foo"] # => true
p sh["exists?", "foo"] # => true
@see Kernel.#test, FileTest... -
TracePoint
# defined _ class -> Class | module (3031.0) -
メソッドを定義したクラスかモジュールを返します。
...Point.new(:call) do |tp|
p tp.defined_class # => C
end.enable do
C.new.foo
end
//}
メソッドがモジュールで定義されていた場合も(include に関係なく)モジュー
ルを返します。
//emlist[例][ruby]{
module M; def foo; end; end
class C; include M; end;
trace = TraceP......oint.new(:call) do |tp|
p tp.defined_class # => M
end.enable do
C.new.foo
end
//}
[注意] 特異メソッドを実行した場合は TracePoint#defined_class は特異クラ
スを返します。また、Kernel.#set_trace_func の 6 番目のブロックパ
ラメータは特異クラスでは......く元のクラスを返します。
//emlist[例][ruby]{
class C; def self.foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => #<Class:C>
end.enable do
C.foo
end
//}
Kernel.#set_trace_func と TracePoint の上記の差分に注意して
ください。
@see 50864... -
String
# %(args) -> String (679.0) -
printf と同じ規則に従って args をフォーマットします。
...
printf と同じ規則に従って args をフォーマットします。
args が配列であれば Kernel.#sprintf(self, *args) と同じです。
それ以外の場合は Kernel.#sprintf(self, args) と同じです。
@param args フォーマットする値、もしくはその配列
@retu......{
p "i = %d" % 10 # => "i = 10"
p "i = %x" % 10 # => "i = a"
p "i = %o" % 10 # => "i = 12"
p "i = %#d" % 10 # => "i = 10"
p "i = %#x" % 10 # => "i = 0xa"
p "i = %#o" % 10 # => "i = 012"
p "%d" % 10 # => "10"
p "%d,%o" % [10, 10] # => "10,12"
//}
=== spr......tf フォーマット
Ruby の sprintf フォーマットは基本的に C 言語の sprintf(3)
のものと同じです。ただし、short や long などの C 特有の型に対する修飾子が
ないこと、2進数の指示子(%b, %B)が存在すること、sprintf のすべての方言を... -
Thread
# add _ trace _ func(pr) -> Proc (213.0) -
スレッドにトレース用ハンドラを追加します。
...す。
@param pr トレースハンドラ(Proc オブジェクト)
//emlist[例][ruby]{
th = Thread.new do
class Trace
end
43.to_s
end
th.add_trace_func lambda {|*arg| p arg }
th.join
# => ["line", "example.rb", 4, nil, #<Binding:0x00007f98e107d0d8>, nil]
# => ["c-call", "example.rb", 4, :i......ple.rb", 4, :inherited, #<Binding:0x00007f98e1085d00>, Class]
# => ["class", "example.rb", 4, nil, #<Binding:0x00007f98e108f210>, nil]
# => ["end", "example.rb", 5, nil, #<Binding:0x00007f98e108e5e0>, nil]
# => ["line", "example.rb", 6, nil, #<Binding:0x00007f98e108d4b0>, nil]
# => ["c-call", "examp......le.rb", 6, :to_s, #<Binding:0x00007f98e1097aa0>, Integer]
# => ["c-return", "example.rb", 6, :to_s, #<Binding:0x00007f98e1095cc8>, Integer]
//}
@see Thread#set_trace_func Kernel.#set_trace_func...